I recently decided to play with cache a little bit in symfony 1.4.
I've been reading Chapter 12 of the Gentle introduction to symfony, to
get to know cache.
However I stumbled on a obstacle with removing cache across apps. It
look pretty easy when you read it here:
http://www.symfony-project.org/gentle-introduction/1_4/en/12-Caching#chapter_12_sub_clearing_cache_across_applications
However the snippet there doesn't work.
Point is that adding an item in the backend, I want to clear the list
(or index) cleared for frontend's cache.
So I copied the code, and modified, added 'module/index' string.
According to the book, that should be it. However it isn't.
the removePattern for the sfFileCache, joins the passed cache_dir with
pattern directly: cache_dir/pattern, but there are few folders between
in my case (maybe it's always like this?):
project_localhost/all
giving the cache_dir/project_localhost/all/pattern as the general path
for my template cache on my dev server.
The only way to make it work is to use **/module/index/** which I just
realised (something like bouncing wall for ideas this post became ;])
Suggested way in book's chapter 12:
$cache->removePattern('user/show?id=12'); might work on other cache
classes, but certainly isn't working for sfFileCache. I'd suggest
updating book, unless there's some kind of bug?
Grzegorz Śliwiński
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony 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/symfony-users?hl=en