Hi guys,
I'm new here, was previously using the old Castle Forum... didn't know
this group existed. lol.
Anyways, I'm using the Cache Attribute to set up some caching for some
actions in a controller like this:
[Cache(HttpCacheability.Public, Duration = 86400, VaryByParams =
"CategoryId" )]
public void ProductPropertyValues() { ... }
The caching works as advertised but I want to create an action to
clear the cache manually using something like this:
public void ClearCache()
{
IDictionaryEnumerator CacheEnum = HttpRuntime.Cache.GetEnumerator
();
while (CacheEnum.MoveNext())
{
HttpRuntime.Cache.Remove(CacheEnum.Key.ToString());
}
RenderText("Cache Cleared!");
}
}
Right now this doesn't work as the cache only contains my Nvelocity
templates. Which cache is being used?
Also I'm from RoR background, and I know in RoR you can set up an
observer to expire the cache when models change. Is there anyway to
accomplish this in Monorail?
Looking forward to your expert advice,
Jarrold
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---