Is there a generic way to support caching plugins? For example to set a flag after you update an option that caching plugins watch?
No, there isn’t. On top of that, caching may not even occur in WordPress itself. E.g. Varnish, Cloudflare, etc
You will need to handle each plugin on a case by case basis.
The closest you might get, is that a caching plugin watches for post saves to update or invalidate cached results. But since you’re writing a shortcode, there is no mechanism for flushing the cache in a generic way, or indicating that a page should not be cached in WordPress. This is because WordPress does not perform page caching, so all page caching plugins have bespoke unique implementations.
Related Posts:
- WP Super Cache versus W3 Total Cache [closed]
- How to make WordPress ignore GET parameters when caching pages?
- Can I ignore caching of a plugin in W3 Total Cache? [closed]
- How can I render shortcode so that its not cached by Caching plugins?
- Plugin Expires Headers – W3 Total Cache [closed]
- W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]
- Write to / remove from default .htaccess file from plugin?
- Can WordPress Plugin Directory Cache Delay the Upload of Images?
- Will setcookie work if there is a cache plugin installed?
- With W3 Total Cache when I publish a post it does not appear in the homepage. Only if i purge all cache [closed]
- Correct way to perform non-cacheable DB query
- w3 Total Cache not Caching – Requested URI is rejected [closed]
- Changes not visible when not logged in
- Object Caching Plugin force every plugin to cache objects?
- Warning! PHP safe mode enabled!
- W3 Total Cache Help – How to update DNS Zone for a static domain [closed]
- What archive plugin works with W3 total cache? [closed]
- Memcaching recurring SQL Queries
- Content-Security-Policy implementation with WordPress W3Total Cache plugin installed
- Problem with MEMCACHE and Redis with wp_options
- How to fix caching issue in PHP data from database
- W3 Total Cache and IIS7 not doing much [closed]
- Browser Cache causes ‘Orderby=rand’ to return the same posts
- Prevent duplicate records in plugin table
- Send Custom welcome email to specific user group
- woocommerce payment gateway callback not firing [closed]
- How to modify WCMP Rest API response?
- Fetch Children of Grouped Products Inside WooCommerce Product Loop
- White page by using filter template_include
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Making a Template for a CPT created by a plugin
- Woocommerce dependent plugin
- WordPress.org Plugin Directory doesn’t recognise screenshots [closed]
- External CSS in WordPress Plugin [closed]
- How to check current user before all actions and filters?
- Owl Carousel2 image not displaying full width when using Stretch row and content, Stretch row and content(no padding) in wordpress
- User Session and Stored Cookies not get removed
- New databes tables with – WooCommerce – for developers [closed]
- How can I prevent my plugin go development trunk [closed]
- Plugin-generated pages use Not Found or Pages Archive templates?
- How can I make 2 plugins that include different versions of a framework to both use the latest version?
- creating html reusable blocks via shortcodes
- Add Plugin options as subpage to Theme options page
- Is there any kind of theme on WordPress to sell my own movies?
- Image upload and download from front-end
- Create a navbar filter that filters by a custom field
- Change commission_status paid when withdraw_status vendor is completed
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- Passing an array from shortcode-function to filter-function
- custom payment gateway in woocommerce failed to connect to remote api server
- wp_remote_get() returns 403 while file_get_contents() does not
- Single API call exposed via shortcode with params
- Plugin options page with live preview?
- Using SVN to upload plugin created with gutenberg blocks
- Force quit running background job
- Modifying Author Link to add Author Meta in URL
- How to output CMB2 select options from repeated groups select elements?
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Get Time Taken By Each Action Hook in WordPress
- How to export post 2 posts WordPress plugin data [closed]
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- WordPress plugin creation how to execute .sql in order to insert multiple rows at activation of plugin
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- get 404 when accessing wp-admin/plugin-install.php
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- create link/button to purge cloudflare cache on post
- I want to auto populate data in three fields if one drop down is selected
- Best place for if/else piece of code related to custom plugin?
- How do you assign a UUID to posts/products/comments/reviews?
- Best way to initiate a class in a WP plugin?
- correct way to include a library(and its dependent libraries) in wordpress development
- How does task scheduler plugin implements cron that is not dependent on page load request? [closed]
- Issue Tracker from pre exsisting table [closed]
- How to make a implement queue for scheduling tasks in WordPress?
- Session destroyed on page redirect
- WordPress Plugin [closed]
- wp.media javascript issue with on select
- Is there a way to test that readme looks in other language before submitting translation?
- What are the specifics of WordPress development I need to know? [closed]
- Insert data from .sql file in wordpress plugin
- WP_Async_Task doesn’t appear to be running asynchronously
- jQuery for custom plugin not working with Divi theme
- How can I make my metabox appear?
- Ajax call returning 0
- How can i get the post’s full html source by its ID?
- How to set add question capability for author role in wp pro quiz plugin
- Consolidate plugin functionality into a theme
- What would I need to write into a custom plugin in order to add a switch for a custom string of CSS to the edit page?
- Force file download on plugin activation
- How to inform the user that the save was not successful?
- php page not found for plugin options menu
- qTranslate remove default directory from link
- How to update post’s content on post publish?
- Homemade plugin while using Themify Ultra
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- Custom plugin init action causing general slowness
- WP All Import – Execute Imports
- WordPress Backend HA (Automatic failover)