Open byteperfect opened 3 years ago
You're welcome! Happy to hear that you're enjoying Cache Enabler. Anything is always up for consideration. To better understand this request, can you please let me know what type of add ons you'd like to implement if this were to be introduced? Like the functionality that you're trying to add with the add ons.
For example, I need to have my own files naming based on certain conditions and be able to alter should_start
, deliver_cache
and start_buffering
behavior.
I am sure that similar functionality will be in demand by other developers as well. For example:
https://github.com/keycdn/cache-enabler/issues/226.
Thanks for explaining a little more about why you would like this to be added. Like with our other requests, let's leave this open as that allows others to comment and/or upvote your request.
In case you are loooking for inspiration, WP Super Cache has support for cache plugins (docs) that go into ./wp-content/plugins/wp-super-cache-plugins/
(in wp-cache-phase1.php): Plugins can manipulate the results by hooking into "cache actions" (add_cacheaction()
and do_cacheaction()
).
In my humble opinion, I think the cache plugins should be normal plugins that can be installed/uninstalled via the normal WordPress plugin repository and they should make themselves "available" to advanced-cache.php through the creation and removal of symlinks in a conf.d
like directory, which could default to ./wp-content/plugins/cache-enabler-plugins/
(but should be overridable via a constant like CACHE_ENABLER_PLUGINS_DIR
).
First of all, I would like to express my gratitude for the good work you are doing!
Could you please consider the possibility of adding add-ons functionality to the plugin? This will allow sites developers to use your plugin as a basis and gives the ability to flexibly configure the caching system for each specific site.
As one of the implementation options, I suggest you the scheme that I use on my sites.
wp-config.php
file, add an array with absolute paths to add-ons bootstrap files as a constant or a global variable, for example:advanced-cache.php
file, before otherrequire_once
add the following code:Return values from all functions must be passed through filters, for example: