-
☆ A M B ☆
- 2,213 Posts
Hello,
Did you check out these extras?
Primes Cache -
http://modx.com/extras/package/refreshcache
Selective Cache Clearing -
http://modx.com/extras/package/uncacher
Quote from: AMDbuilder at Oct 31, 2012, 09:09 PMHello,
Did you check out these extras?
Primes Cache - http://modx.com/extras/package/refreshcache
Selective Cache Clearing - http://modx.com/extras/package/uncacher
Thanx for the directions. I didn't know these Extras. I'm currently testing them but i had problems with the first (didn't fire) and the second is slowing the save process on every resources which is another problem..
Meanwhile, my friend @ackwa has found a nice workaround. He made an extension for Batcher Component ( you can find it here:
https://gist.github.com/4001336) which had a new option "refresh cache" to the main menu. (when you install you need to clear all cache, close your browser to appear etc..) So you can benefit the Batcher parameters like selecting by template.. and rebuild the cache only for the selected resources. I think it's a very elegant way because it's in the UI.
It's not heavly tested but on slow server or on very heavy pages you can have timeout..
Actually, if you want to see the request, you need to open the console under the "Network" tab.
CTRL+SHIFT+U - Clear Cache
CTRL+SHIFT+H - Hiding Heft Panel
CTRL+SHIFT+N - Fast Create Resource
CTRL+ALT+P - Preview Recource (in edit resorce window)
CTRL+ALT+S - Save
Another incredible optimisation trix to gain speed on first cache is to check if you have conditions with chunks or snippets :
for example replace :
[[If?
&subject=`[[*id]]`
&operator=`is`
&operand=`19`
&then=`[[$myCHUNK]]`
]]
with :
[[[[*id:is=`19`:then=`$myCHUNK`]]]]
CTRL+SHIFT+U - Clear Cache
CTRL+SHIFT+H - Hiding Heft Panel
CTRL+SHIFT+N - Fast Create Resource
CTRL+ALT+P - Preview Recource (in edit resorce window)
CTRL+ALT+S - Save
-
☆ A M B ☆
- 3,141 Posts
Quote from: jonrawlins at Nov 13, 2012, 08:58 AMQuote from: emmanuel at Nov 13, 2012, 07:07 AMAnother incredible optimisation trix to gain speed on first cache is to check if you have conditions with chunks or snippets :
for example replace :
[[If?
&subject=`[[*id]]`
&operator=`is`
&operand=`19`
&then=`[[$myCHUNK]]`
]]
with :
[[[[*id:is=`19`:then=`$myCHUNK`]]]]
I've actually found that by using Output modifiers as above it slows it down more than if you use the IF snippet.. Again I guess this would totally depend on how many IF snippet and output modifiers were called.
The point in that example from emmanuel is that the chunk is only executed when it SHOULD be be executed. When calling it in the if syntax where the full tag is inside the "then" condition, it will parse inside out. So first [[$myCHUNK]] (which may contain three wayfinder menus that get executed), and only after that it will check if it needs to.
Using the trick emmanuel posted, the parser doesn't see the chunk unless it has to actually parse it.