Where should a plugin cache its re-usable results?
I have read the code of several well-used Wordpress plugins, and it seems that the answer is not consistent. I have written several plugins myself, and I store things in a cache directory. But I just picked the location of the directory out of a hat, and my code creates the cache directory if it doesn't exist. This seems arbitrary.
I know there are plugins that do caching. Suppose I don't want to use a plugin. I find that relying on the filesystem to cache results is easy for maintenance, diagnostics, and performance.
Is there a good, more-or-less standard approach, or a blessed approach, to choosing a filesystem location for a cache?
wp_options
, transients,wp_content
, the object cache, etc.