Skip to content

If you have a reliable object cache backend and want to skip the default WP_User_Meta Session Store, use this class instead. It stores the Session Tokens directly into your configured Object Cache and skips user_meta.

License

Notifications You must be signed in to change notification settings

Hive-IT-GmbH/wp_object_cache_session_tokens

Repository files navigation

WP_Object_Cache_Session_Tokens

If you have a fast and reliable object cache backend and want to skip the default WP_User_Meta Session Store, use this class instead. It stores the Session Tokens directly into your configured Object Cache and skips user_meta. It also makes sure to avoid concurrency issues with user_meta and Object Caches.

Install

Make sure you have a persistent Object Cache installed and activated! Like WP-Redis, Object Cache Pro, ...

  1. Checkout this repository into your mu-plugins folder
  2. Use any of the available mu-autoloader to auto init the new Caching interface

Now you are all set.

Benefits

If your Object Cache is fast and persistent, skip the hassle to end up in there using the WP Meta system. In advance this implementation solves concurrency issues with Object Caching backends. Calls to get_user_meta can access stale runtime cache data even when the data in the caching backend already changed by a concurrent process.

About

If you have a reliable object cache backend and want to skip the default WP_User_Meta Session Store, use this class instead. It stores the Session Tokens directly into your configured Object Cache and skips user_meta.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages