Hi,

Using this awesome module to import an XML feed usig the XPATH parser. iN the content it is uploading images. however after the upload the cache needs to be cleared for the images to be shown. Is there a way i can flush the cache after the upload is completed. Which function deals with the upload/checks when all items have been parsed??

Thanks.

Comments

MegaChriz’s picture

Category: Feature request » Support request
Issue summary: View changes
Status: Active » Fixed

To flush caches after import has been completed, implement hook_feeds_after_import() in a custom module. In there, call drupal_flush_all_caches() to clear all caches. To save performance, you could also lookup which cache to flush exactly for the images to be refreshed. I'm don't know how your images are cached, so cannot help you with that.

Example:

/**
 * Implements hook_feeds_after_import().
 */
function mymodule_feeds_after_import() {
  drupal_flush_all_caches();
}