• Hi there,

    My company is attempting to use your replacement for the WP_Object_Cache for implementing Redis caching on a new site we are setting up, but are having a conflict with another part of our system.

    Basically, we have a Session class that uses the WP Transient API for persisting a data array from request to request using the PHP Session ID (SID) as part of the transient key. On each request, the session data array is updated and resaved to the transient. What we found was that the session transient appeared to be getting reset randomly on requests, and would therefore disrupt the continuity of our sessions. The SID itself would not change, but our Session class would just not be able to find the transient it had saved during the immediately previous request.

    Can you think of any reason why transients would get dumped from the cache on the very next request ? Transient session expirations are actually set quite high, but we are seeing sessions reset between requests that are only a matter of seconds apart.

    We are trying to determine if we should be using an alternate method for persisting data across requests (ie refactoring our session class), or whether to try an alternate caching system.

    Your plugin is working great in every other respect.

    Thank you in advance for your talent, effort and time with regards to this issue.

    https://wordpress.org/plugins/wp-redis/

Viewing 1 replies (of 1 total)
  • Plugin Author Josh Koenig

    (@outlandish-josh)

    Sorry for the late reply.

    For sessions, I would recommend using a native PHP session solution rather than a special class. We wrote one of those:

    https://wordpress.org/plugins/wp-native-php-sessions/

    More generally if you are sure that the objects are truly “disappearing” you might also be running into issues with available storage. I believe the default size is pretty small (in part to force developers to think about this) and if you are storing big objects the LRU algorythm may be kicking in:

    http://redis.io/topics/lru-cache

Viewing 1 replies (of 1 total)
  • The topic ‘WP Redis WP Transients’ is closed to new replies.