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

    As suggested in the recursive parser thread, the current parser can be split into the minimal code to serve a cached page, and load "extender" classes if it needs to be served from database.

    This is a first approach, nothing really completed, but I would love some feedback.

    A number of (Tattoo API) functions are still missing (which are rarely used anyway), but it should work on a default modx install with the attached template for the modified tag call convention stuff....

    Greetz,

    Remon

    P.S.
    Altough it’s by no means finished, I like to have a backup somewhere, so...

      • 25663 MODX Staff
      • 12,272 Posts
      For 0.9.1 we’re going to stick with a cleaned up version of how it is now. For future releases, we’re going to start the major overhaul. I’m not opposed to a split for 0.9.1, just as long as it doesn’t include the recursive parser or revised tag calls. Goal for 0.9.1 is end of next week at the latest.

      Great idea, again! (why have I come to expect this as expected behavior wink )
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 24253
        • 125 Posts
        Sure!

        The new tag parser doesn’t understand the "old" tags anyway, it was meant for the far future ;-)

        I forgot to say, page caches generated with this Tattoo version do not work for some reason, so if you like to test it out on a cached page, create a page cached with the "old" parser by:

        // initiate a new document parser
        include_once($base_path."/manager/includes/tatoo.class.inc.php");
        $modx = new Tattoo();
        
        /*include_once($base_path."/manager/includes/document.parser.class.inc.php");
        $modx = new DocumentParser;*/
        


        Commenting out the one, and uncommenting the other in index.php. Then you will have a cached page which is "valid" somehow, and will be served by Tattoo nicely smiley
        (Don’t forget to reverse this action to have Tattoo active)

        Remon
          • 24253
          • 125 Posts
          Good day everyone!

          Some quick hacks on the parser today.

          I said the page cache wasn’t working but it did work actually! ;-)

          Attached the reworked files in first post.

          Have a nice weekend!

          Remon

          (P.S. siteCache.idx.php is 146 KB here, way too large. Can’t we load snippet/chunk cache etc per snippet/chunk etc?
          siteCache.idx.php was originally used for site config?
          Then we should restore it to that functionallity IMHO, since it adds to the processing time _and_ memory consumption quite a bit!)