sensei
sensei copied to clipboard
Assume persistence on values cached on the Sensei Home API
trafficstars
Right now, we're using the cache group sensei/temporary to cache values for Sensei Home.
Even though that cache group is marked as non-persistent here: https://github.com/Automattic/sensei/blob/c50c2339b57308fa6f6e69a0892eedc361bdd4f1/includes/class-sensei.php#L350 - apparently there are some object cache implementations that ignore completely that function.
So, we should add an expiration (probably somewhat short, like, 1 hour or less?) on the wp_cache_set methods, and avoid saving passing null values to wp_cache_set, to avoid possibly issues when caching that.