Jan Romero Posted August 9, 2022 Share Posted August 9, 2022 Hi everyone, I’ve come across this phenomenon where WireCache never builds cache entries if they were previously attempted to preload. Just wondering if anyone has any experience with preloading WireCache items? Am I doing something wrong? I’ve described the issue here: https://github.com/processwire/processwire-issues/issues/1604 Here is the code I’m using: cache()->preload([ 'imaginary', 'names' ]); //these don’t exist. //now cache()->preloads is [ 'imaginary' => '', 'names' => '' ] $freshlyGeneratedValue = cache()->get('imaginary', WireCache::expireDaily, function() { return 'so fresh'; //this never happens }); var_dump($freshlyGeneratedValue); // string(0) "" Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now