Since version 126.96.36.199 the MDJM Cache Helper class has been included within the core MDJM plugin.
The cache helper exists to instruct caching plugins not to cache specific pages to ensure that content is always served correctly to any visiting user.
Some pages display content dependent on the type of visitor, for example a logged in user may need to see content and a non-logged in user may need to see different content.
As an example, let’s use a contact page which contains an MDJM Dynamic Contact Form. Many caching plugins will cache a page the first time it is visited. If an employee visits a page which contains a Dynamic Contact Form, a notice is displayed instead of the form advising that employees cannot submit the form.
If this page, in its current state, is cached, then the next visitor, which may be a real client wishing to submit an enquiry, will see the no employee notice also. Not good!
The MDJM Cache Helper ensures this does not happen.
Which Pages are Excluded from Caching with the Cache Helper?
Through its cache helper, MDJM will attempt instruct caching plugins to exclude all pages defined within MDJM -> Settings -> Client Zone -> Pages.
We make this instruction by defining various WordPress constants (notably the DONOTCACHEPAGE constant) which tells caching plugins to exclude these pages (so long as they are adhering to WordPress standards) as well as setting headers to prevent caching within different browsers.
Rate this Article
We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of MDJM Event Management.
Please take a moment to let us know if you found this article helpful.