You're right, we do need cache invalidation. I just came up with a clean way to do it without tweaking app.yml settings, adding a table or making glob() calls: just use a file in the asset-cache folder to hold the current cache key. The OS should cache reads from that file extremely well.
It may even be possible to avoid the filesystem hit by writing it as a PHP file in cache/frontend/prod/config that just calls sfConfig::set(). Then with any luck it would be autoloaded and even cached by APC until its modification date changes just like an app.yml setting would. But plain old file_get_contents() calls to a simple file with an asset cache version number in it would also get cached nicely by the operating system so it might be overkill to try to wedge it into Symfony's cache. On Aug 15, 11:44 am, pghoratiu <pghora...@gmail.com> wrote: > > It might be worthwhile to take things a step further by versioning > > them in the URL so that they can be given an infinite cache expiration > > date, although this requires a database hit or perhaps a glob call > > when outputting the pages that contain them. The code is a big step > > forward as-is if you are using unminimized, uncombined CSS and JS and > > has no negative impact on your existing caching issues, but we'll > > think about next steps. > > ==== > I think think it's important to add cache invalidation as well. My > suggestion is to append another key > to app.yml to have a cache key that can be updated manually and append > that key too the minified resource > file: > all: > a: > ver:1 > css/main.css?ver=1 > This way css and js pages can be cached indefinitely on the client > side without having problems when manually > updating the css or js files. > > gabriel -- 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 symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en