Skip to content

Instantly share code, notes, and snippets.

@rmccue
Created December 6, 2009 12:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rmccue/250195 to your computer and use it in GitHub Desktop.
Read SimplePie cache without opening SimplePie
<?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