I am having some issues with full view caching in cakephp.
The url that I would like to cache is /posts/badge/23/size:180x150
I have been able to cache the view successfully by adding $cacheAction = "1 hour";
to the controller.
Since I do not want to cache all methods in the controller (just specific methods) I tried to use the array syntax to match the url /posts/badge/23/size:180x150
where 23 is the post ID and size is a named parameter (there are 2
variations of size).
So my question is what is the proper (if any) match to place in cacheAction to cache all posts/badges/* Here are some examples that I have tried:
var $cacheAction = array(
'badge/*' => '+1 hour',
'posts/badge/23/size:180x150' => '1 hour',
'badge/23/size:180x150' => '1 hour',
'posts/badge/:id/:size' => '1 hour',
'badge/:id/:size' => '1 hour',
);
None of these seem to match (or at least do not cache for some reason). I do need to cache posts/badge//size: and trap each of the parameters being passed.
Again, if I set $cacheAction = "1 hour"; then the cache file is created (the file tmp/cache/views/posts_badge_23_size_180x150.php is created)
Has anyone been able to create a cache for a dynamic url?