Hello i have a problem with my website. It is running slow. I asked the my server provider why is that, and they replied its because the webiste uses many embedded urls like youtube, vimeo, dailymotion and so on. And so i have to cache these embedded urls. I tried to use php_fast_cache (http://www.phpfastcache.com/). This is what i put on the page that returns the urls
- The urls are stored in the database like this https://www.youtube.com/watch?v=6__s2-iytA0
- $orimessage is a variable i use for the url https://www.youtube.com/watch?v=6__s2-iytA0
On my server this folder cache.storage appeared so that means that goes on the include("phpfastcache/phpfastcache.php");
include("phpfastcache/phpfastcache.php"); $cache = phpFastCache("memcached"); // try to get from Cache first. $results = $cache->get($orimessage); // Write to Cache Save API Calls next time $cache->set($orimessage, $results, 3600*24); foreach($results as $video) { if(textlink($video)) { //some code here } }
i have these questions
- What i am doing wrong?
- Do i need to put *include("phpfastcache/phpfastcache.php");
$cache = phpFastCache("memcached"); * on my config file?