Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
    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);
        $cache->save($resultsItem);
    }

    $results = $resultsItem->get();

    foreach($results as $video) {
        // Output Your Contents HERE
    }
@vukanac

This comment has been minimized.

Copy link
Owner Author

vukanac commented Jan 11, 2017

Get real content from ResultsItem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.