You are here

function parser_simplepie_nodeapi in FeedAPI 5

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

Delete cache validating functions when feed is deleted

File

parser_simplepie/parser_simplepie.module, line 57
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;
    }
  }
}