We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i Created a php file and run this code to grab a json and store in .cache file, Everytime i refresh the php page, cache is also refreshed,
So Now shall I read the json data from the php file or from the .cache file to save api limits ?
The text was updated successfully, but these errors were encountered:
You have to create something like this.
//Include Cache require_once 'includes/cache.class.php'; //Create the cache $cache = new Cache(array( 'name' => 'mycache', 'path' => 'cache/', 'extension' => '.cache' )); $cache->eraseExpired(); if($cache->isCached("hello") === false){ echo("Save in cache -> hello <br>"); $cache->store('hello', 'Hello World!', 60); //60 Seconds } else{ echo("Read to cache -> hello <br>"); } if($cache->isCached("test") === false){ echo("Save in cache -> test <br>"); $cache->store('test', 'Hello test!', 45); //45 Seconds } else{ echo("Read to cache -> test <br>"); }
Sorry, something went wrong.
No branches or pull requests
i Created a php file and run this code to grab a json and store in .cache file,
Everytime i refresh the php page, cache is also refreshed,
So Now shall I read the json data from the php file or from the .cache file to save api limits ?
The text was updated successfully, but these errors were encountered: