Page MenuHomePhabricator

Fix caching problems with XTools
Closed, ResolvedPublic3 Estimated Story Points


The new XTools caching layer is caching a bit too aggressively and it won't let people clear the cache.

Event Timeline

kaldari triaged this task as Medium priority.Apr 11 2017, 10:31 PM
kaldari set the point value for this task to 3.
MusikAnimal raised the priority of this task from Medium to High.Apr 19 2017, 3:01 PM

This is blocking testing of T160481, T162752, T162754, and anything else we do moving forward.

@Samwilson I looked into this for an hour or two last night, but got nowhere :( Would you mind taking a look? What are we doing that could be incompatible with PHP 5.5?

Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.

It's something weird about the redis extension being installed and so it's ignorning the \Predis\Client that a 5.5-compatible library is providing. Or something. :-)

So the error being thrown when purging prod cache was this:

PHP Fatal error:  Call to undefined method Redis::scan() in vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/RedisAdapter.php on line 214

Which comes about when using the \Redis class instead of \Predis\Client, which it seems was happening because we had cached prod service-constructing code from before (I'm assuming; it's sort of hard to figure out the order of things) we included the Predis library. The cache-clearing system is annoying: it clears the data cache and the code cache, and so if there's an error in the latter that prevents it from finishing, there doesn't seem to be anyway to clear the code cache (short of doing it manually).

So, to fix, manually nuke the cache directories:

$ rm -r  var/cache/*
$ ./bin/console c:c 
 // Clearing the cache for the dev environment with debug true                                                
 [OK] Cache for the "dev" environment (debug=true) was successfully cleared.                                                                                                                                           
$ ./bin/console c:c --env prod
 // Clearing the cache for the prod environment with debug false                                              
 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.                                

And all seems to be okay now. Can you confirm?

MusikAnimal closed this task as Resolved.EditedApr 20 2017, 2:14 AM

So, to fix, manually nuke the cache directories

How frustrating, could have sworn I tried that... anyway IT WORKED!! We are back in business :D Thanks for looking into this, and also pointing out the c:c shortcut