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]
- 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
- Edit plugin without hooks in functions.php
- How to find out if option exists but is empty?
- Is dynamic forms/entries possible in Widget?
- Trigger a custom wordpress plugin with a linux cron
- update_meta_user difference in i:1 and b:1, how to write b:1
- Registration Form Validation in wordpress
- Add_rewrite_rule doesn’t add custom url in plugin
- Dequeue / Deregister script and replace it with a new plugin
- How to add inline css/js inside a shortcode
- Is this plugin being loaded before file.php, subsequently not allowing me to use certain functions?
- Hide Theme options and Customize Admin menu
- How do I write into a file (css)
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Where should I save an API key of my user when installing my plugin?
- How to make a customize role and view a specific plugins base on that role?
- Allow users of my plugin to define their own shortcode rather than use mine?
- CRUD and Frontend show from a custom table without shortcode
- Map Custom Registration Fields to WordPress User Roles
- custom payment gateway in woocommerce failed to connect to remote api server
- Plugin options page with live preview?
- Ajax call returning 0
- WordPress plugin admin html being shown in Customizer iframe
- WordPress Widget – Saving multidimensional arrays into $instance
- Ordering taxonomies by rank
- Plugin Options not being output
- My homemade plugin is trying to update to someone else’s plugin
- Submit Form data to another page via Ajax (WordPress Way)
- Why Does The `auto_update_plugin` Hook Disable Management?
- Is there a way to add custom endpoint to specific page only
- IF condition based on wp_remote_get output
- Add User Role: Pre-saved in User-Meta [SOLVED]
- Add_rewrite_endpoint doesn’t work with post name permalink structure
- Is there a script to collect all hooks and filters provided by a plugin?
- How WordPress core manage the plugin installation
- Why is my WordPress Plugin page requesting my FTP Login Credentials?
- Cross Sells are not being shown in Cart Page. Please Help!
- Post status doesn’t update to ‘future’ every time?
- adding custom code as a wordpress plugin
- count the number of views of a post excluding own views
- How To Create A File Archive in WordPress?
- Custom Post Type, Custom Columns List
- How to set Google Analytics tracking code on WordPress plugin directory page?
- How to add styles to a submenu page?
- Show Custom Post on Frontend
- Problem with checked box on wp car manager plugin
- Create a link that calls our custom function in WordPress
- Update a previous version of plugin when the new plugin is built from the scratch
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- Load my Inline js footer area
- Remove action added in plugin class from theme
- wc_get_product_terms() throws “Notice: Undefined offset: 0”
- Woocommerce list variations that are added already to cart in Single Product
- Plugin json page
- WordPress Admin sub-level menu issue
- How do I add a textarea (multirow) option to my WordPress plugin?
- PHP header() not available to use in my plugin
- Passing ajax variable to more than one wordpress plugin function
- search into subcategories plugin subcategory value not come
- Why isn’t my plugin seeing other classes?
- Should I Save widget HTML to a file cache?
- How Can the_post Be Hooked Like the_content and the_excerpt?
- How to add jquery to my custom post type wp plugin
- Update post meta not working on wp_postmeta
- How to tell which Plugin is displaying?
- Check if user is in a group of another site within multisite network [closed]
- Redirect url in plugin to somewhere else?
- wp_insert_post_data filter to set category
- Site is setup statically – how to make it content managable?
- is there a way I can add or remove some plugin options?
- How to provide access to specific plugin to all the user roles except subscriber in wordpress
- What can I do to customize a widget provided with this plugin? from where have I to start?
- how to remove a rel=”nofollow” using call to action plugin
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- How to update changes to multiple sites at the same time
- wp_handle_upload – specified file failed upload test
- Why am I getting an error when requiring a file in my plugin?
- Running a function using Crown WordPress on one day a week, for example, Mondays of every week
- How to make a Template page to show the information of different things Shop and Product page?