Hello,

Great idea on this module and I look forward to following the development!

I see that your module supports clearing the cache for specific views. I am having an issue where I update an image (re-crop using imagefield crop) in node edit, then go to the Views page but still see the old image. A manually refresh of the browser would update the views page to show the updated image. The Views setting is set to Cache: None so should this be happening? Would you have any idea why the views page would still show the old image after the image is changed in the node edit and saved and I return to the views page? I have moved an issue to the views queue #720884: Views page still caching when setting Cache: None, but with your knowledge of the caching system I was hoping if you may be able to assist.

Would your module be able to provide a workaround to my issue?

Thanks!

Comments

fabsor’s picture

Status: Active » Fixed

Hi and thanks for taking an interest in the module!

The views caching system works on the server side and only caches the output from the view (meaning: The output drupal generates). It will not affect any images, since they are fetched by the browser in a separate request. What you're experiencing seem to indicate that your browser have a cached version of the image which it shows.

Have you considered using the module imagecache? You will then be able to create different image presets with different sizes, keeping the original image intact. It will actually create different images for each preset you set up, which will result in the browser having to reload that image if that preset has changed (Imagecache invalidates images that haven't been updated).

YK85’s picture

Hi fabsor,

Thanks for the quick reply! I am currently using Imagecache module and have a custom preset. The views page has the field with the cck image and the custom preset is selected. The image is shown correctly (as per imagecache preset) on the views page but the issue I am having is that if a user goes to the node edit page and changes the cropping of the image, saves, then goes to the views page the old image still shows. Once you manually refresh the browser the image updates to the newly cropped version of the image. So I thought the views page is caching the old image, but the setting in the view is set to Cache: none. To confirm your explanation above, so the image shown on the views page is not being cached by views but by the browser? How can I avoid the image from being cached and the correct image to show as soon as I go to the views page after saving the node edit with the newly cropped image? Your module? =)

Thanks!

fabsor’s picture

My module does not deal with clearing out imagecache caches currently. I don't have an exact path to go from here, but I would suggest that you have a look at your server configuration. Depending on how it is configured, it might send back the "wrong" headers to the client. Note that this might actually be a good thing for performance, since the web server does not have to send the image over again.

Try to use firebug in firefox and see what response you get from the server when the browser requests the image, and see if this could be related to the server.

This is getting very off topic, so if you have any further problems, please post something in the support forums or on #drupal-support on freenode.

Good luck =)

fabsor’s picture

Status: Fixed » Closed (fixed)

Closing this issue.