We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5091
    • 332 Posts
    when should a snippet calls be cached or uncached and what are the diffference?

    I am so confused. I learned something from others’s snippets’ call, sometimes there are cached, sometimes they are not and I can’t tell the different it made.

    For instance, I have ditto call cached for my site, I remember this is what I learned from copying the Modx template. Was reworking on the tag part, going through the archive from the forum, I see others’ Ditto call are not cached.  My modx’s site manager loads very slow, I was also wondering if it has to do with the cached and uncached I did to the documements.

    Thanks!

      • 22303 MODX Staff
      • 10,725 Posts
      Unfortunately, it’s a complex subject at the moment, though much is being done to simplify the topic and functionality for the 0.9.7 release. For the current MODx however, make sure you understand the information at http://www.modxcms.com/document-caching.html for starters. Then you can check out the gory details of the current parsing process.

      But basically, there is one major effect of using the non-cacheable tag format, i.e. [!Snippet!]; in a nutshell...

      Non-cacheable tags are skipped by the first pass of the parser, and are not processed until all of the "cacheable" content from the document is processed.

      Having snippet calls cached or uncached should not affect the loading of the manager. If you have a large number of documents or a lot of manager plugins, that might be the cause. Or, have you checked your event log and/or manager log? I sometimes experience slow downs once I get 10’s of thousands of records in one of those tables as is starts to take longer to insert a new record at that point.
        • 5091
        • 332 Posts
        Hi Jason, thank you so much.

        So far I only have about 30 documents in the manager; event log is empty - I read about this in one of the thread so I am aware of this issue. Was comparing my main site’s manager and one I setup for testing purpose. I think I may see what is causing it (don’t want to accuse any snippet here) but am not 100% sure. Had tvEditor and tvExplorer installed 3 weeks ago, although I am not 100% positive that the manager loaded faster before, all I can say is I only noticed the slowness last week or so. Last time I notice the slowness was with Kiwee eCommerce module installed.