Title: Object cache bug?
Last modified: June 16, 2025

---

# Object cache bug?

 *  Resolved [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-bug-3/)
 * Hi, I’m working on a small plugin that needs to distinguish between an empty 
   option and an option that is not set. This is normally done reliably by looking
   at what `get_option()` returns: an empty value ” (when empty) or the boolean 
   false (when not found).
 * I have noticed that when Object caching (in my case via Redis socket, have not
   tested other scenarios) is on, this behavior is not always consistent.
 * When the empty value is fetched from the DB and stored by the cache, the response
   is always ” (correct) but right after saving the empty option from admin, `get_option('
   my_setting' )` starts responding with `false` instead of ” (not correct!).
 * Only after a cache purge, the correct response is back. Or if I disable the Object
   caching on the admin entirely, of course…
 * Is this a known issue?

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/object-cache-bug-3/?output_format=md) [1](https://wordpress.org/support/topic/object-cache-bug-3/?output_format=md)
2

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-bug-3/page/2/#post-18521871)
 * 👍

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/object-cache-bug-3/?output_format=md) [1](https://wordpress.org/support/topic/object-cache-bug-3/?output_format=md)
2

The topic ‘Object cache bug?’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 16 replies
 * 2 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [11 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-bug-3/page/2/#post-18521871)
 * Status: resolved