I updated a row in the variables table to change the value of a variable. Then I truncated the cache table. But a call to variable_get() still returns the original value.

I thought that the variables were cached in the cache table, so where could this original value be hiding?

EDIT: I waited a few minutes and tried again and it was OK. So the immediate problem is solved, but I would like to understand what happened. Is there another layer of caching? It seems there must be since it could not have gotten that value by querying either cache (empty) or variable (containing new value).

  • variable_set and variable_del exist for a reason, try to use them ;) – mikeytown2 May 25 '14 at 15:02

Got it - the call to variable_get() was during the bootstrap process, so cache_bootstrap table also needed to be truncated.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.