It works fine :) - as long as you remember that each php script executed from the command line uses its own cache, so you cannot access the data saved by script1 inside script2. (you cannot access it at a later start to script1, since it clears when the script ends)
These caches are also separate from the cache that you most likely want to use, and that the php script cache is executed through your web server.
So, if you have those tests that have been saved on your website so that you can access, for example, http: //localhost/file1.php , then http: //localhost/file2.php
It will work as expected.
It also means that you cannot clear the web server cache server from the command line. The caching code (user cache or operation code) must be executed through your web server. It will be wget from shell or file_get_contents () from php cli - according to your taste and circumstances.
Rau
source share