Disable cache on a block - RSS FEED issue

I have an RSS feed block that is getting cached. (kinda defeats the purpose of an RSS feed)



If I view /var/cache/



I see this folder and file



/rss_data_cache_39/time.csc



If i read the file its the cached contents of my RSS feed.



I've tried implementing this solution: http://blog.techiedharma.com/122/programming/cs-cart-block-content-issue



I added this to the file:

$schema['data_functions']['STATIC_TEMPLATE_BLOCK']['templates']['blocks/rss_feed.tpl']['disable_cache'] = true;



But it did not stop the caching.



i'm using 2.2.2 PROFESSIONAL



Anyone have any other ideas?



could this be a bug with the RSS Feed?

Tony,



Didn't think of this earlier, but what about changing the cache method to sqlite or something? Then the cache is in the database instead of the file. Isn't it supposed to be a little faster also?



Thanks,



Brandon

Good thought!



Changed to sqlite and it still caches RSS Feed Blocks.



Sounding like a bug to me, why would you cache RSS feeds??

For now the only way to fix it was to disable the cache completely.



I opened up my sqlite cache file here:



‘core/cache/class.cache_backend_sqlite.php’



and commented out everything after this line:


static function set($name, $data, $condition, $cache_level = NULL)
{ /* COMMENT OUT

*/
}
}




That disables all caching which isn't ideal but solves my issue temporarily.

config.local.php

// Tweaks
$config['tweaks'] = array (
'js_compression' => false, // enables compession to reduce size of javascript files
'check_templates' => true, // disables templates checking to improve template engine speed
'inline_compilation' => true, // compiles nested templates in one file
'anti_csfr' => false, // protect forms from CSFR attacks (experimental)
'disable_block_cache' => false, // used to disable block cache
'join_css' => false, // is used to unite css files into one file
'allow_php_in_templates' => false, // Allow to use {php} tags in templates

Tool,



Thanks but I tried setting “disable cache on blocks” = True and it did not fix the issue.



TonyK

Figures. I think I recall one of the staff stating that some of these don't work.?

Looks that way.



Right now i basically removed all the code from the caching mechanism and caching is off on the entire site.



I posted a bug, hopefully I will have more info next week.



Thanks for the attempt!

While we are on the “no cache” subject, this is how I disable it all together.



/core/class.registry.php

* @param boolean $no_cache if set to true, data won't be cache even if it's registered in the cache
*
* @return boolean always true
*/
static function set($key, $value, $no_cache = false)
{
$var = & self::_get_var_by_key($key, true);
$var = $value;

Found a workaround by editing this file



core/fn.cms.php function fn_get_rss_feed($data) line 1261:



Registry::register_cache($data_key, SECONDS_IN_HOUR, CACHE_LEVEL_TIME);



SECONDS_IN_HOUR - the time in seconds.



Set “seconds_in_hour” = 0 and now it updates while the rest of the site is cached.