We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • That will work, though unless you do your own caching of some type, your performance is likely not going to be great when using this technique. You are essentially creating a front-controller within a front-controller.
      • 29774
      • 386 Posts
      Hmm, arguably the performance hit would not be dissimilar to running an un-cached snippet within a template, which is what you need to do currently to get a dynamic view. But I take your point, and I think a caching solution could work if you serialised the snippet output (which in my proposed scheme would be an array of placeholders and their values) and stored the string in an appropriately named file, eg /assets/cache/[snippet]/[method].[id].cache.php, the existence of which would be checked (and content retrieved and unserialised) prior to running the selected controller. But then you’d need to be sure that the cache files are created/cleared/updated at appropriate times, which could be fiddly...
        Snippets: GoogleMap | FileDetails | Related Plugin: SSL
        • 19787
        • 28 Posts
        @therebechips sounds like an interesting idea. Let us know if you make any progress or need some testers!
          • 29774
          • 386 Posts
          I’m going ahead with this and will update this topic when I have some code for testing.
            Snippets: GoogleMap | FileDetails | Related Plugin: SSL