We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37272
    • 216 Posts
    Hi,

    Am I right in saying that chunks cannot be cached? I assume that pages are created as they are called, and the browser only receives what it would haver done without a CMS. I have some blocks, quotes, etc., where I have a shadow effect, and the text is repeated in it’s own box, offset, behind the real text box. Obviously it would be better if I the block text is cached somehow, so that although it is rendered twice, it is called only the once.

    Any comments or suggestions? - Thanks.
      • 7455
      • 2,204 Posts
      chucks are (when you have caching on that page set to on) alway cached there is no reason not to cache them cause they are static chucks of code.

      Dimmy
        follow me on twitter: @dimmy01
        • 37272
        • 216 Posts
        You mean, that a chunk is cashed, independantly? So it is downloaded once only?

        I guess I have very little idea of how a CMS works, or browsers for that matter. I thought the html (template and html content) was constructed, serverside, and the browser gets what it would have gotten if you weren’t using a CMS.

        So, if I understand correctly, for these blocks of text that have a shadow block (with text too, both for effect, and a 100% sure-fire method of boxes fitting the text), I should use chunks. The text (and maybe the container) will then be downloaded once only. This will not enable pages to download a hell of a lot faster, but enough for me to implement it. It will also make editing easier (one lot of text).

        Thanks.
        • Chunks are not cached separately client-side. The client does indeed only receive the final html page as if you had written out the whole page by hand. In fact, the server itself (such as Apache) receives a complete page for serving. Caching on the server side is done by MODx, and only saves MODx parsing time.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 37272
            • 216 Posts
            Hi Susan,

            Ah, what I originally thought then. But if I understand you correctly, I would save a little on server load by using the same chunk for the shadow. This makes sense anyway, as it means there is only one block of text to edit.

            Thanks.
              • 32241
              • 1,495 Posts
              FYI, all chunks, snippets, plugins, modules are cached by MODx, but before it’s being parsed. So there is no trip back to MySql server, unless if something changed.

              I might be wrong though.
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media