blogotext icon indicating copy to clipboard operation
blogotext copied to clipboard

reset cache when new post

Open B4rb3rouss opened this issue 6 years ago • 4 comments

When a new post is published, a mecanism to reload cache might be considered. (for rss.php as example).

(btw, I have many "cache" files for RSS on my install)

B4rb3rouss avatar Feb 07 '18 16:02 B4rb3rouss

Maybe when submitting the form when posting a new article, a small PHP line can set the cache time too old :

$flux_cache_lv2_path = DIR_VHOST_CACHE.'cache2_rss_'.substr(md5((isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : ''), 0, 8).'.dat';

// if cache file exists
if (is_file($flux_cache_lv2_path)) {
    touch($flux_cache_lv2_path);
}

B4rb3rouss avatar Feb 07 '18 17:02 B4rb3rouss

Yep, considering that the feed must be kept up-to-date when adding / removing content, it seems to me to be a bug.

remrem avatar Feb 17 '18 13:02 remrem

I took a look at the cache system (level 2) and there is no way to remove the caches related to articles, you must delete everything. So, I think the best is to push back to the BT 3.8 and review it a bit, at least the naming system for cache files.

Good for you ?

remrem avatar Apr 06 '18 04:04 remrem

As I have no better answer, yes, that's good to me.

B4rb3rouss avatar Apr 06 '18 05:04 B4rb3rouss