You are here

function feeds_sync_cache_feeds_http in Feeds 7.2

Scheduler callback for keeping the cache dir and cache entries in sync.

This makes sure that files that appear in the Feeds cache directory that are no longer referenced in the cache_feeds_http bin, are cleaned up. The entries saved in the cache_feeds_http bin and the actual cached files saved on the file system can get out of sync when:

  • Truncating the cache_feeds_http table manually.
  • When using an alternative cache class for the cache_feeds_http bin (other than 'FeedsHTTPCache').

Related topics

5 string references to 'feeds_sync_cache_feeds_http'
FeedsFileHTTPTestCase::testCachedFilesCleanupQueue in tests/feeds_fetcher_http.test
Tests if the cron task for cleaning up cached files are run one at a time.
FeedsHTTPCache::startSync in includes/FeedsHTTPCache.inc
Queues all files to be synced with the cache list.
FeedsHTTPCache::sync in includes/FeedsHTTPCache.inc
Removes files for which an entry no longer appears in the cache.
feeds_cron in ./feeds.module
Implements hook_cron().
feeds_cron_queue_info in ./feeds.module
Implements hook_cron_queue_info().

File

./feeds.module, line 233
Feeds - basic API functions and hook implementations.

Code

function feeds_sync_cache_feeds_http(array $job) {
  FeedsHTTPCache::getInstance('cache_feeds_http')
    ->sync($job['files']);
}