Skip to content

Instantly share code, notes, and snippets.

View Geolim4's full-sized avatar
🇺🇦
💕🇫🇷

Georges.L Geolim4

🇺🇦
💕🇫🇷
View GitHub Profile
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 = [
[
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) {
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
<?php
/**
* FILE: phpfastcache-bundle/Service/Cache.php
**/
/**
*
* This file is part of phpFastCache.
*
* @license MIT License (MIT)
*
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
*/
<?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) <khoaofgod@gmail.com> http://www.phpfastcache.com
// ==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;

$memCache = CacheManager::getInstance("memcached");
$redisCache = CacheManager::getInstance("redis");
$filesCache = CacheManager::getInstance("Files");

/**
* Get Items
*/
    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-&gt;isHit()) {
    use phpFastCache\CacheManager;

    $cache = CacheManager::Memcached();

    // try to get from Cache first.
    $resultsItem = $cache->getItem("identity_keyword")

    if(!$resultsItem->isHit()) {
 $resultsItem-&gt;set($cURL-&gt;get("http://www.youtube.com/api/json/url/keyword/page"))-&gt;expireAfter(3600*24);