Using both FeedAPI and Views to build blocks with feeditem node types, caching is essential as the block queries are quite heavy (I'm working on reducing them and that's not the issue here).
I've enabled Block cache on the performance page - added the block cache alter module to control better which type of cache method to use, as the views module uses 'no cache' as default for blocks.
With all this set up, my blocks are caching fine ... except, the cache isn't refreshing at all - until I manually clear the cache on the performance page. I thought that adding nodes and other things like that would refresh the cache every now and then. Cron is running every 10 mins to update the feeds created via the FeedAPI, and therefore, nodes are created every 10 minutes, but nothing appears to be moving at all in the cache department.
What is it that triggers cache refresh?
What do I need to do to get regular refresh of the cache?
Is there any way to set different TTL times on each block, because everytime 'clear all cache' is run, the next visitor on the site is going to get a 1min+ load time on the front page, which is quite unacceptable (again, load times is a different issue I'm working on in a different place).
I've tried hacking the block.module by adding time() + 360 to line 475 (cache_set($cid, $array, 'cache_block', CACHE_TEMPORARY);) but apparantly that only works in one direction, to ensure that cache isn't refrehsed until after the exipraton of set time, but still, it isn't refreshed immediately after, as I anticipated (immediately or at least at next cron run).
I really miss not being able to set TTL times in the block config pages, as killes and others suggested while doing the latest block cache development. But perhaps that would yield to the same result ... cache not refreshed until at manual run.
Comments
Comment #1
elfur commentedThis is probably related to http://drupal.org/node/227228 and I'm therefore changing my support request to a bug report.
Someone else might agree with me and deem it a duplicate, that's ok :)
thanks
/elfur
Comment #2
gbaudoin commentedClosing, as related bug is fixed.