I am trying to use phpFastCache for all caching needs but I really don't understand how to use it. I understand their are examples and yes I have tried them and they are successful but it's not helping me in terms of what I need to do.
I am trying to cache a query (Valve's source query protocol to be exact.)
Here are the results, also, I am using a separate SourceQuery script and this is just the results (queryresults.php):
$serveroneip = "example.ip";
$serveroneport = "27015"
$server = new SourceQuery($serveroneip, $serveroneport);
$infos = $server->getInfos();
And then just add that to the index.php page:
<?php
include ("queryresults.php")
?>
<p>'.$infos['players'].' / '.$infos['places'].'</p>
That would just print the current player count and the total players on the source server. I am basically trying to cache that query because it helps page load times.
If I sound like a complete noob at this I am very sorry. This is just an issue that has been frustrating me for the past few days and I looked here as a last resort. If you need more info I can happily provide it! Thank you so much for the help!
As of Phpfastcache V5, the library comply with PSR6 interface
So basically the code would be pretty simple, and even easier with composer:
If its not installed globally:
The composer.phar can be downloaded here: https://getcomposer.org/composer.phar
Now the code, with your case:
Anyway I warmly suggest you to make use of composer. This will make your dependencies management easier and allow you to gain an absolute control over automatic updated, conflict management, autoloading nightmare, etc.