Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2019-04-05 10:35:32
- kaka
- Banned
What are the tradeoffs in using the plugin cache directory?
I have never used the plugin cache directory. Does it offer better performance than installing plugins via the Plugins tab? Is it a better way to do things, for developers who want to master it? Or is it just different?
Re: What are the tradeoffs in using the plugin cache directory?
At the moment, it’s just different (although we have plans to make it more ingrained in the workflow). The main differences are currently:
- Plugins in the cache directory are “always on” (as long as they have a
.php
extension). - They can be version controlled more easily.
- They do not run through the plugin lifecycle stages so plugin authors need to be wary of this and code around it presently.
- They are loaded in alphabetical order and have no other concept of load order like database plugins do.
- From 4.7.x, language strings in cached plugins are loaded on-the-fly, not installed in the database.
- You need to be careful not to have two identical plugins (even different versions) in the cache dir and database or your site/admin side will crash.
Other than that, performance is just down to how many you have and whether they are on spinning disk or SSD. You should probably ensure the directory you choose is outside docroot too, though it’s up to you.
Hope that helps.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline