Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.71 KB

README.md

File metadata and controls

51 lines (32 loc) · 1.71 KB

MOCache (WordPress .mo cached translations)

The WordPress gettext implementation is very slow. It uses objects that cannot be cached into memory without reinstanting them.

MOCache generate a PHP hashtable (array) with all seen translations. If external object cache (Redis, Memcache, Memcached, etc.) is active they are saved in transients. If not, they are saved in temp files (OPcache can grab the values from memory).

Moreover, MOCache does lazyloading for strings that are only encountered in output. It does not load all translations for a domain if it is not necessary.

Installation

Drop mo-cache.php into wp-content/mu-plugins and enjoy the added speed :)

The more plugins you have the better the performance gains.

Support

Let us know how it goes or report an issue at Issues panel.

Contribute

  • Anyone is welcome to contribute to the plugin.
  • Please merge (squash) all your changes into a single commit before you open a pull request.

Credits

2021 Creame.

MOCache is heavily inspired and is a mix with the best of:

License

GPLv3

Changelog

1.0.0 - 20 May 2021

  • Initial release