use phpFastCache\CacheManager;
$memCache = CacheManager::getInstance("memcached");
$redisCache = CacheManager::getInstance("redis");
$filesCache = CacheManager::getInstance("Files");
/**
* Get Items
*/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/phpFastCache/Drivers/Memcache/Driver.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/phpFastCache/Drivers/Memcache/Driver.php (revision cd3bf582ea58c90e9610a92ed85dd32b0f455301) | |
+++ src/phpFastCache/Drivers/Memcache/Driver.php (date 1516568443195) | |
@@ -143,6 +143,7 @@ | |
$servers = [ | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/phpFastCache/Drivers/Mongodb/Driver.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/phpFastCache/Drivers/Mongodb/Driver.php (revision aa05addaa6fa00378a0bc87e36aecca8436491a0) | |
+++ src/phpFastCache/Drivers/Mongodb/Driver.php (revision ) | |
@@ -87,15 +87,22 @@ | |
*/ | |
if ($item instanceof Item) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Service/Cache.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- Service/Cache.php (revision e972969478c2ad67d9befe771b5783d57aea7542) | |
+++ Service/Cache.php (revision ) | |
@@ -26,10 +26,15 @@ | |
*/ | |
class Cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* FILE: phpfastcache-bundle/Service/Cache.php | |
**/ | |
/** | |
* | |
* This file is part of phpFastCache. | |
* | |
* @license MIT License (MIT) | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/phpFastCache/Drivers/Couchbase/Driver.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/phpFastCache/Drivers/Couchbase/Driver.php (revision 6e6ec8d6d3dddfe102a52b87f6de06e91f3e52a2) | |
+++ src/phpFastCache/Drivers/Couchbase/Driver.php (revision ) | |
@@ -109,7 +109,11 @@ | |
* Check for Cross-Driver type confusion | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* This file is part of phpFastCache. | |
* | |
* @license MIT License (MIT) | |
* | |
* For full copyright and license information, please see the docs/CREDITS.txt file. | |
* | |
* @author Khoa Bui (khoaofgod) <[email protected]> http://www.phpfastcache.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Doctrine Time Threshold Filter | |
// @namespace Doctrine | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
function loadScript(url, callback) { | |
var script = document.createElement("script") |
use phpFastCache\CacheManager;
$cache = CacheManager::Memcached();
$keyword_webpage = md5($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING']);
// try to get from Cache first.
$resultsItem = $cache->getItem($keyword_webpage)
if(!$resultsItem->isHit()) {
use phpFastCache\CacheManager;
$cache = CacheManager::Memcached();
// try to get from Cache first.
$resultsItem = $cache->getItem("identity_keyword")
if(!$resultsItem->isHit()) {
$resultsItem->set($cURL->get("http://www.youtube.com/api/json/url/keyword/page"))->expireAfter(3600*24);
NewerOlder