TDBF Posted July 16, 2017 Share Posted July 16, 2017 When updating CMS (Pages/IP Content) Blocks or templates, the 'front' end CMS blocks are not updated right away as the caching is not flushed. Can it be possible to have the caching flushed when blocks or the CMS templates are updated? I have to constantly clear the cache and this is a huge annoyance when working with CMS blocks and templates. I actually consider this a bug. Link to comment Share on other sites More sharing options...
opentype Posted July 16, 2017 Share Posted July 16, 2017 It annoys me a lot is not the definition of bug. ;-) The cache time is connected to the setting called “Cache sidebar, header and footer blocks” by the way. Link to comment Share on other sites More sharing options...
TDBF Posted July 16, 2017 Author Share Posted July 16, 2017 2 hours ago, opentype said: It annoys me a lot is not the definition of bug. ;-) The cache time is connected to the setting called “Cache sidebar, header and footer blocks” by the way. It's a bug! When updating templates/blocks the cache should be cleared to reflect the updated information/code. Caching should only be honoured if the code/content has not been updated. Link to comment Share on other sites More sharing options...
opentype Posted July 16, 2017 Share Posted July 16, 2017 57 minutes ago, TDBF said: It's a bug! No, it isn’t. But I am happy to explain it for the 36th time in this forum: A bug is behaviour the developers did not intend, e.g. a typo in that cache command that would cause it not to work. But you just wanting such a cache command that doesn’t exist yet is not a bug, but a “feature request”. Link to comment Share on other sites More sharing options...
TDBF Posted July 16, 2017 Author Share Posted July 16, 2017 Just now, opentype said: No, it isn’t. But I am happy to explain it for the 36th time in this forum: A bug is behaviour the developers did not intend, e.g. a typo in that cache command that would cause it not to work. But you just wanting such a cache command that doesn’t exist yet is not a bug, but a “feature request”. Okay, I'll just ignore my 17 years of professional and open source development experience as a PHP developer. Well that bug you say isn't a bug, well I just fixed it. So now, any changes made to my templates are reflected right away, rather than having to wait. Which is the correct way of dealing with stale content.... in my humble opinion! Link to comment Share on other sites More sharing options...
opentype Posted July 16, 2017 Share Posted July 16, 2017 It’s not a matter of opinion and no reason to laugh at my comment. Had you posted that in the bug tracker, it would have been closed, because the software is “working as intended” by the developers. The caching isn’t malfunctioning, it’s just not functioning like you want it to. So you are not reporting a bug, you are requesting a different behaviour. That’s just logic and proper use of terms. Your coding experience doesn’t give you authority over words. That’s a fallacy and therefore doesn’t impress me much. Link to comment Share on other sites More sharing options...
TDBF Posted July 16, 2017 Author Share Posted July 16, 2017 33 minutes ago, opentype said: That’s a fallacy and therefore doesn’t impress me much. And your suggestion that it isn't a bug merely on your say so, likewise. I kindly ask you put me on ignore, thank you. Link to comment Share on other sites More sharing options...
TAMAN Posted July 16, 2017 Share Posted July 16, 2017 Not really a bug also not a good idea to clear caches every time you edit or update a block template Link to comment Share on other sites More sharing options...
TDBF Posted July 16, 2017 Author Share Posted July 16, 2017 44 minutes ago, TAMAN said: Not really a bug also not a good idea to clear caches every time you edit or update a block template Even in Development mode? Link to comment Share on other sites More sharing options...
opentype Posted July 16, 2017 Share Posted July 16, 2017 54 minutes ago, TDBF said: And your suggestion that it isn't a bug merely on your say so, likewise. No, that’s not what a fallacy is. ;-) 54 minutes ago, TDBF said: I kindly ask you put me on ignore, thank you. Come on! You can’t even stand the clarification of terms? That’s a helpful thing. Link to comment Share on other sites More sharing options...
Daniel F Posted July 17, 2017 Share Posted July 17, 2017 This will be "fixed/improved" in the next release. ( It should be deleted, but there was indeed a bug in the code, so the block cache wasn't deleted after the block was edited) Link to comment Share on other sites More sharing options...
newbie LAC Posted July 17, 2017 Share Posted July 17, 2017 Cache will be deleted if block created with type "Plugin" static public function deleteCachesForBlocks( $key=NULL, $app=NULL, $plugin=NULL ) { /* Delete any custom block caches relevant to this plug in */ if ( $key OR $app ) { $where = array( array( 'block_type=?', 'plugin' ) ); Link to comment Share on other sites More sharing options...
TDBF Posted July 17, 2017 Author Share Posted July 17, 2017 2 hours ago, Daniel F said: This will be "fixed/improved" in the next release. ( It should be deleted, but there was indeed a bug in the code, so the block cache wasn't deleted after the block was edited) Ty, glad to hear as it was pretty annoying Link to comment Share on other sites More sharing options...
DesignzShop Posted July 17, 2017 Share Posted July 17, 2017 I've often wondered about this myself and always considered this wai so I never thought it worthwhile to report. Very happy to see this has a correction coming Link to comment Share on other sites More sharing options...
Computer Candy Posted August 29, 2018 Share Posted August 29, 2018 I hope this is a relevant place to post this. I'm using a stock calendar block and a custom Page that show calendar events from an iCalendar feed that I have setup in the back-end. I thought there was a problem with the calendar not syncing with my Google calendar, but Invision's calendar system seems to update. However, the stock calendar block and my custom Page do not. Does anyone have any insights on how to clear the cache for these? Thank you. 🙂 Edit: Opening and resaving the custom Page doesn't seem to push a cache update. Link to comment Share on other sites More sharing options...
opentype Posted August 29, 2018 Share Posted August 29, 2018 Blocks are cached based on the setting for the sidebar blocks caching time in the ACP. To flush the block cache, you need to flush the entire cache in the support section of the ACP. Link to comment Share on other sites More sharing options...
Computer Candy Posted August 29, 2018 Share Posted August 29, 2018 Thank you for your reply. Unfortunately, I can't find anything like that under "Support". The closest thing I can find is "Cache sidebar, header and footer blocks For x seconds" under "Advanced Configuration" > "Server Environment". Mine is only set for 300 seconds so it should have updated by now but it hasn't. And I still can't find a way to flush the entire cache. My "Caching Method" is set to "- No caching -". Link to comment Share on other sites More sharing options...
sudo Posted August 29, 2018 Share Posted August 29, 2018 Its not obvious but you go Support -> Something isnt working and that triggers a cache clear. Link to comment Share on other sites More sharing options...
Computer Candy Posted August 29, 2018 Share Posted August 29, 2018 That did the trick for both locations. I'll make a note of this so I hopefully don't forget. Thank you! Link to comment Share on other sites More sharing options...
Joel R Posted August 29, 2018 Share Posted August 29, 2018 38 minutes ago, Computer Candy said: That did the trick for both locations. I'll make a note of this so I hopefully don't forget. Thank you! It's what we commonly refer to as the "support tool." It's basically a very convoluted way of clearing cache. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.