Skip to content
/ mocache Public

WordPress .mo cached translations. Generate a fast PHP hashtable with only used translations and store it in external object cache or files.

License

Notifications You must be signed in to change notification settings

creame/mocache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

WordPress .mo cached translations. Generate a fast PHP hashtable with only used translations and store it in external object cache or files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages