Topic: Cached files not being 'seen' after changing page_cache_directory
My question is: how can i get rails to use cached files when they are being created in the 'public/cache' directory rather than in 'public'?
Following the directions in fngtips article entitled 'lazy sweeping' i changed the directory into which rails writes its cache files by adding the following line to my environment file.
config.action_controller.page_cache_directory = RAILS_ROOT+"/public/cache/"
Running my app (locally) i can see that rails is creating the cache files properly in public/cache, but it's not 'seeing' them. The next time the same url is accessed the log files show that the cache is being ignored, and getting re-generated.
If i remove the custom cache_directory instruction (so that cached files are dumped into the root of 'public') then rails uses the cached files as expected. But this is inconvenient for mass-deletion of cache files.
Does anyone know how to ensure that cached files stored in public/cache are used properly?