OK, so I know you can put $Revision$ in a file, and then set the svn:keywords property on that file so that whenever the file is committed, that variable is replaced with the last committed version number.
I'd like to use this concept to implement a smart caching layer for my template files. I plan on using the svn revision number as part of the key to look up from cache.
Here's some psuedo-code:
function get_from_cache(){
$key = 'TEMPLATE_CACHE_$Revision$';
$template = apc_fetch($key);
}
The catch is, I want $Revision$ to be replaced with the current revision number every time a file is committed in the templates/ directory, not every time a file containing the get_from_cache() function is committed. How can I do this?