Created
December 6, 2009 12:16
-
-
Save rmccue/250195 to your computer and use it in GitHub Desktop.
Read SimplePie cache without opening SimplePie
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 | |
require('simplepie.inc'); | |
$cache = SimplePie_Cache::create($cache_location, md5($url), 'spc'); | |
// Load data | |
$data = $cache->load(); // returns instance of SimplePie | |
// Get timestamp | |
$time = $cache->mtime(); // returns integer | |
// Update timestamp | |
$cache->touch(); | |
// Save a new SimplePie instance | |
$cache->save($sp); // returns boolean | |
// Wipe cache | |
$cache->unlink(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment