Stegothedump
2012-07-03T11:35:54Z
I have the code below...

YafContext.Current.Cache.Clear();

But I'm getting a compile error, has this been removed or moved?

S
Sponsor
tha_watcha
2012-07-03T13:02:42Z
Originally Posted by: Stegothedump 

I have the code below...

YafContext.Current.Cache.Clear();

But I'm getting a compile error, has this been removed or moved?

S



its

YafContext.Current.Get<IDataCache>().Clear();

or this

this.Get<IDataCache>().Clear();
UserPostedImage
Stegothedump
2012-07-03T13:18:44Z
thanks! what is the IDataCache though?
tha_watcha
2012-07-03T13:33:51Z
Originally Posted by: Stegothedump 

thanks! what is the IDataCache though?



Its the Interface for the cache system.
UserPostedImage
Stegothedump
2012-07-03T13:47:23Z
weird I'm still getting an error??


Error 5 The type or namespace name 'IDataCache' could not be found (are you missing a using directive or an assembly reference?) C:\websites\CloudWiseForum\YetAnotherForum.NET\NewUserReg\NewUser.aspx.cs 48 40 YAF

Pretty sure i have all the assemblies referenced?

S
tha_watcha
2012-07-03T13:58:47Z
Originally Posted by: Stegothedump 

weird I'm still getting an error??


Error 5 The type or namespace name 'IDataCache' could not be found (are you missing a using directive or an assembly reference?) C:\websites\CloudWiseForum\YetAnotherForum.NET\NewUserReg\NewUser.aspx.cs 48 40 YAF

Pretty sure i have all the assemblies referenced?

S



You need to add a using to the NewUser.aspx.cs Page

using YAF.Types.Interfaces;

or

YafContext.Current.Get<YAF.Types.Interfaces.IDataCache>().Clear();

and Make sure you are referencing the YAF.Types.dll

UserPostedImage
Stegothedump
2012-07-03T14:04:08Z
Thanks Watcha I had YAF.Types but not YAF.Types.Interfaces.

S

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved