Translations Cache WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
WordPress mu-plugin to reduces file reads for translations by caching the first read via APCu.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/wearerequired/translations-cache/archive/refs/heads/master.zipSimple WordPress must-use plugin to reduce file reads for gettext (.mo) and JavaScript (.json) translations by caching the first read via APCu.
By default the cache TTL is set to six hours without any automated cache invalidation. You can set the TRANSLATIONS_CACHE_KEY_SALT environment variable to change the key for the cache which will force the plugin to read from a fresh cache entry.
Installation
- Define the dropin path for
wordpress-muplugincomposer config --json --merge extra.dropin-paths '{ "wordpress/content/mu-plugins/": [ "type:wordpress-muplugin" ] }' - Install
koodimonni/composer-dropin-installerandwearerequired/translations-cachecomposer require koodimonni/composer-dropin-installer wearerequired/translations-cache
Example of a composer.json for a site:
{
"name": "wearerequired/something",
"require": {
"koodimonni/composer-dropin-installer": "^1.0",
"wearerequired/translations-cache": "^1.0"
},
"extra": {
"dropin-paths": {
"wordpress/content/mu-plugins/": [
"type:wordpress-muplugin"
]
}
}
}
Releases
4 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.
