You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using CachePool to set one or multiple values, an exception is thrown when the value for the specified key is already what is being set. In other words, setting the same value for the same key twice in succession will result in an error.
This is because under the hood update_option() (the function that WP uses to set transients) will return false in such a scenario.
Suggested Solution
Introduce an additional check in CachePool: if setting fails, get the current value and if it's the same as the new one - don't throw.
The text was updated successfully, but these errors were encountered:
The Problem
When using
CachePool
to set one or multiple values, an exception is thrown when the value for the specified key is already what is being set. In other words, setting the same value for the same key twice in succession will result in an error.This is because under the hood
update_option()
(the function that WP uses to set transients) will return false in such a scenario.Suggested Solution
Introduce an additional check in
CachePool
: if setting fails, get the current value and if it's the same as the new one - don't throw.The text was updated successfully, but these errors were encountered: