Giter Club home page Giter Club logo

Comments (9)

mahagr avatar mahagr commented on July 29, 2024 1

Basically the static caching caches the particle instances by configuration. If configuration changes, new cache key is used and the instance gets updated in the page. Nothing else affects the caching and there's no specified timeout on the cache.

So static means that it'll be cached (up to) indefinitely and only either clearing cache or changing the configuration of the particles clear the cache.

from docs.

RyanMPierson avatar RyanMPierson commented on July 29, 2024

Awesome. Will get to it next.

from docs.

mahagr avatar mahagr commented on July 29, 2024

There's really only one caching mode (aside for not caching/being dynamic): static. I also added menu, but it has still some issues with some configurations, so it's not being used.

Static caching is permanent caching which only takes account of particle configuration. Basically, it caches the particle until the configuration of the particle changes.

Static caching only works for particles which have no changing content. You cannot cache particles with a date in it, nor can you cache any particles, which use platform content or methods with changing values. This is why caching has been disabled by default.

For changing content, I need to add caching with a timeout. The support is kind of there already, I've just not had time to add and test it out.

from docs.

thexmanxyz avatar thexmanxyz commented on July 29, 2024

@mahagr @w00fz I have a question on the static caching configuration because I'm not 100% sure what is actually does. Are only the values of the particle cached or is any content generated by the particle cached? Let's assume a particle with static configuration values that generates dynamic content e.g. from Joomla or fetched from a JS API. Is in this case the dynamic content cached or is it written out as it is?!

from docs.

thexmanxyz avatar thexmanxyz commented on July 29, 2024

@mahagr thanks for your answer. So static caching should only be used for particles that display completely static content? Am I understanding that right? So dynamic content generated by an API would be cached the first time the particle is loaded and then kept until the particle configuration changes or the cache is cleaned? sorry for my demand but I want to clearly understand when to use it and when not :)

from docs.

mahagr avatar mahagr commented on July 29, 2024

Yes, it should only be used when there are absolutely no changes from view to view. Caching gets disabled in development mode, BTW.

from docs.

thexmanxyz avatar thexmanxyz commented on July 29, 2024

@mahagr Alright :). Thanks for you patience!

from docs.

RyanMPierson avatar RyanMPierson commented on July 29, 2024

http://docs.gantry.org/gantry5/particles/particles#caching

from docs.

mahagr avatar mahagr commented on July 29, 2024

Looks good!

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.