admin/app/views/cache/imageDecache.scala.html
@import controllers.cache.ImageDecacheController @(messageType: ImageDecacheController.MessageType = ImageDecacheController.DefaultMessage, image: String = "", originImage: Option[String] = None)(implicit request: RequestHeader, context: model.ApplicationContext) @admin_main("Clear image", isAuthed = true) {
@messageType match { case ImageDecacheController.DefaultMessage => {
Paste the url of the image you want to clear below. Include the entire url with all it's parameters, e.g. http://i.guim.co.uk/img/media/50b199773ec0da712975ca57d3d091b595c5b14d/0_381_5760_3457/5760.jpg?w=605&q=85&auto=format&sharp=10&s=4d5f3f8b08f7475e51161145293f0f19
Works with images on i.guim.co.uk, static.guim.co.uk and media.guim.co.uk. ALL versions of the image will be cleared - so if you submit an image with query paramter width=20, the cache will also be busted for the same image with width=50
NOTE The original image must first be deleted from the "docroot" before this tool will be effective (this tool simply clears caches). This tool will warn you if the image is still on the "docroot", but this tool cannot remove images from the "docroot" (talk to the tools team). If the image is still on the docroot then the caches will simply be repopulated.
} case ImageDecacheController.ImageStillOnOrigin => {
Warning Clear cache messages have been issued, but the image is still on the "docroot" so the caches will simply be repopulated. You need to remove the original image from the "docroot" and then clear again.
@originImage.map { origin =>
The original image URL is @origin
} } case ImageDecacheController.Cleared => {
Done Clear cache messages have been issued, NOTE that this can take a minute or two (there are a number of 3rd parties that need to clear caches). If it has not cleared in 5 minutes give it another try.
} case ImageDecacheController.Error => {
Warning There was an unknown error, please try again. If this persists please contact the development team.
} } Clear}