Hi Tom, I'd suggest you retrieve the page by path to find out its uuid and then remove it from cache using the methods for removing cache items by uuid.
The reason is that there might be multiple variants of this page in the cache - with or w/o selectors, with different locales, with different parameters or headers, etc ... you get the picture. While you can possibly construct the key for the cache item from the url used to create such a cache entry, there are way too many other variants to make it reliable. I don't have the code in front of me right now, but since some recent version there are even commands you can call with the uuid to remove the cache entries, so you can run it from scheduled task or as part of the workflow. HTH, Jan On Oct 29, 2010, at 3:39 PM, Thomas Duffey wrote: > > Hi Everyone, > > Is it possible to programmatically remove items from the Magnolia cache? In > particular, I would like to programmatically remove pages from cache when > certain things occur. I found some code about removing items from cache by > UUID but in some cases I will only know the page handle and it will include a > selector, e.g., > > /foo/bar.one.html > /foo/bar.two.html > etc. > > Does Magnolia even cache URLs with selectors separately and is there a way to > remove just one of them from the cache if I know the handle? > > Tom > > -- > Tom Duffey > [email protected] > 414-915-3915 > > > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
