I find that relying on the filesystem to cache results is easy for maintenance, diagnostics, and performance.
Please note that this might be true in some (maybe even most) circumstances, but not all of them. If your code is meant for anything beyond personal usage you don’t know with which file system and hardware will it be used and how will it perform there.
WP is engineered to use database for storage of textual data, that is more typical and logical first choice than file system.
Is there a good, more-or-less standard approach, or a blessed approach, to choosing a filesystem location for a cache?
wp-content folder is meant as a place for files uploaded or generated during operation. Plugins that use file cache should create folder for it in there. Note that WP is flexible about most of folder structure and it can be easily renamed/relocated from defaults – use appropriate functions to determine that rather than hardcode default path.
Related Posts:
- Why my browser keeps loading old version of custom JavaScript files in \divi\js? [closed]
- Best WP cache plugin for large site [closed]
- How would implement StackExchange ‘Questions with similar titles’ for the FAQ on my wordpress site
- Can I ignore caching of a plugin in W3 Total Cache? [closed]
- Getting “Fatal error: Call to undefined function wp_cache_get() in option.php” after updating a cache plugin [closed]
- Plugin Expires Headers – W3 Total Cache [closed]
- Remove caching from wp_remote_get calls from custom plugin
- W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]
- WooCommerce & Caching [closed]
- Write to / remove from default .htaccess file from plugin?
- Can WordPress Plugin Directory Cache Delay the Upload of Images?
- How many SQL queries WP Super Cache make to serve cached page?
- How can I add Expire headers to images?
- Preferred way of cacheing a value in php
- Possible htaccess configuration issue for HTTPS websites by WP Fastest Cache plugin? [closed]
- 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
- Plug-in Conflict: Art Direction and Super Cache
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- create link/button to purge cloudflare cache on post
- How to handle cookies from a WordPress plugin on a cached page?
- w3 total cache and sitemap.xml
- Caching RSS plugin data
- Adding (image) caching to my Tumblr widget
- w3 Total Cache not Caching – Requested URI is rejected [closed]
- My homemade plugin is trying to update to someone else’s plugin
- _prime_post_caches in wordpress
- Combining several CSS files into one for optimization
- Can WordPress Drop-ins be given their own directory?
- How Can I Safely Remove WP-Super Cache without messing my site up? [closed]
- What is the best way to cache pages on WordPress
- Changes not visible when not logged in
- How to add support for caching plugins for my own plugin?
- site url is not working after migrtaion in worpress, all links are broken
- Object Caching Plugin force every plugin to cache objects?
- How to save comment name email url fields?
- Cache plugin for medium traffic news blog
- Warning! PHP safe mode enabled!
- W3 Total Cache Help – How to update DNS Zone for a static domain [closed]
- I’m having several WP issues, especially with missing images
- Error activating certain plugins
- What archive plugin works with W3 total cache? [closed]
- W3 Total Cache plugin chronic message
- How do I minify a plugins CSS/JS code?
- WordPress Cache delete on plugin uninstall
- Memcaching recurring SQL Queries
- How to stop Facebook mobile in-app browser cache on WordPress
- how long do restored versions take to go live?
- I’m receiving the following error using the below code: Uncaught Error: Cannot use object of type WP_REST_Response as array
- Problem with MEMCACHE and Redis with wp_options
- How to fix caching issue in PHP data from database
- Execute inline javascript in wordpress after page fully loaded
- How to reset WP plugin?
- WordPress logout appends cache/all/index.php to the site_url()
- How to cache for multi server environment? Memcached, Redis or other?
- How can I refresh the plugins cache manually?
- How to find out programmatically whether any cache plugin is installed in the WordPress website?
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- Should I Save widget HTML to a file cache?
- Session alternative for plugins (due to caching)
- W3 Total Cache and IIS7 not doing much [closed]
- File permissions for wp-minify plugin
- Website keeps going down, is it a plugin, database, memory problem, or something else?
- WP Super Cache versus W3 Total Cache [closed]
- Browser Cache causes ‘Orderby=rand’ to return the same posts
- Fragmented Static Conversion of WordPress Pages
- How can i store cache of wordpress a database request without plugins?
- How can I wordpress cache a database request with no existing plugin?
- Request initiator chain contains old CDN
- How to make WordPress ignore GET parameters when caching pages?
- Sudden ERR_HTTP2_PROTOCOL_ERROR on every JS and CSS files loads
- Dropdown menu only appearing when logged in
- all plug-ins load scripts on all pages
- How to configure redis object cache for multiple sites in the same server without errors
- How to load wp_editor via AJAX
- How to check if user is in back end?
- Is there a standard for naming plugin versions
- How can I have two different urls for the same page that load two different templates?
- Is there an A/B testing plugin that lets you vary the heading, featured image, and content in a WordPress post?
- Need a WordPress Plugin for Google Analytics, Favicon, Meta Keywords & Description?
- How to hide fields from my user profiles
- Register Custom Post Type from Plugin
- How to make my plugin theme-independent?
- Plugin to set all Posts in a certain Category to a certain Post Format
- Updating post meta for custom post types
- How should I handle errors within a plugin?
- Add custom buttons with custom actions in Edit Post screen in WordPress?
- pre_set_site_transient_update_plugins wont call on hosted webspace
- 403 Forbidden – You don’t have permission to access /wp-admin/admin-ajax.php on this server
- Put code into body tags near top, using a plugin
- I need to have two 1-5 star rating fields, only editable by admins. Which plugin should I use?
- 500 Internal Server Error when updating htaccess
- Create unique identifier that is displayed to the user and admin via Ninja Forms
- Manually add order item with fixed product_id in WooCommerce
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- How to update WordPress plugins to latest using SVN
- WordPress Blank Screen Issue [closed]
- Custom Plugin – Package and Deployment Solutions
- How to display (plugin?) output on a single page (not a widget, probably not a short code) – template, plugin, combination?
- How to password protect a category page / not posts?