Coder Social home page Coder Social logo

Comments (7)

TobiasBg avatar TobiasBg commented on June 20, 2024

Thanks for your report! I wouldn't necessarily call this a conflict, but just something that needs to be considered when using caching.
TablePress can indeed clear the cache of a caching plugin (and it does that for three commonly used caching plugins). However, from what I can see from a quick glance at the Quick Cache plugin page, it only seems to have a "mini-API" to prevent caching on a page. That's obviously not what we want. Do you maybe know if there also a function to clear the Quick Cache cache?

from tablepress.

bryant1410 avatar bryant1410 commented on June 20, 2024

Wow, what a quick response! I was thinking the same, if there is or not a cache invalidate for a certain group or pages, or something like that. I don't know. I'm gonna search a little.

What I know is the following, which appears in Quick Cache WP settings page:

Developing a Theme or Plugin for WordPress?

Tip: Quick Cache can be disabled temporarily. If you're a theme/plugin developer, you can set a flag within your PHP code to disable the cache engine at runtime. Perhaps on a specific page, or in a specific scenario. In your PHP script, set: $_SERVER['QUICK_CACHE_ALLOWED'] = FALSE; or define('QUICK_CACHE_ALLOWED', FALSE). Quick Cache is also compatible with: define('DONOTCACHEPAGE', TRUE). It does't matter where or when you define one of these, because Quick Cache is the last thing to run before script execution ends.

Writing "Advanced Cache" Plugins Specifically for Quick Cache

Theme/plugin developers can take advantage of the Quick Cache plugin architecture by creating PHP files inside this special directory: /wp-content/ac-plugins/. There is an example plugin file @ GitHub (please review it carefully and ask questions). If you develop a plugin for Quick Cache, please share it with the community by publishing it in the plugins respository at WordPress.org.

Why does Quick Cache have it's own plugin architecture? WordPress loads the advanced-cache.php drop-in file (for caching purposes) very early-on; before any other plugins or a theme. For this reason, Quick Cache implements it's own watered-down version of functions like add_action(), do_action(), add_filter(), apply_filters().

from tablepress.

TobiasBg avatar TobiasBg commented on June 20, 2024

No problem! :-)
Yes, that's also the information that I found, but that's not really what we should be doing here. There's no need to prevent caching on pages with tables at all. What we would need is a method to flush the cache whenever a table is edited (that's also what the plugin does with the other caching plugins).

from tablepress.

bryant1410 avatar bryant1410 commented on June 20, 2024

What about this? https://github.com/WebSharks/Quick-Cache/wiki/Clearing-the-Cache-Dynamically

It seems to clear all the cache, but appears to be the only method available.

from tablepress.

TobiasBg avatar TobiasBg commented on June 20, 2024

That's perfect! Nice find! I'll add that to TablePress shortly.

from tablepress.

bryant1410 avatar bryant1410 commented on June 20, 2024

Thank you very much @TobiasBg

from tablepress.

TobiasBg avatar TobiasBg commented on June 20, 2024

No problem, you are very welcome! :-) Good to hear that this will be helpful!
If you want, you can benefit from this by installing TablePress 1.4 again from a fresh download, where I just added this feature, too.

from tablepress.

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.