You are here

function parser_simplepie_nodeapi in FeedAPI 6

Same name and namespace in other branches
  1. 5 parser_simplepie/parser_simplepie.module \parser_simplepie_nodeapi()

Delete cache validating functions when feed is deleted

File

parser_simplepie/parser_simplepie.module, line 23
Parse the incoming URL with SimplePie then provide a data structure of the feed

Code

function parser_simplepie_nodeapi(&$node, $op) {
  if (isset($node->feed) || feedapi_enabled_type($node->type)) {
    switch ($op) {
      case 'delete':
        $cache_file = _parser_simplepie_sanitize_cache() . '/' . md5($node->feed->url) . '.spc';
        if (file_exists($cache_file)) {
          unlink($cache_file);
        }
        break;
    }
  }
}