0

If a request is made to a CDN for a resized image, am I right in assuming that a second request for the same image but for a different size will NOT return the cached image?

E.g.

  • 1st request: myphoto.jpp 100x200
  • 2nd request: myphoto.jpg 200x400

The above will result in two hits to my ImageResizer server won't it? This is my assumption, I just want to be sure.

I guess another way to ask the question is, does the CDN consider the entire url or just the image being requested?

Any guidance is greatly appreciated.

geoff
  • 2,251
  • 1
  • 19
  • 34
wallismark
  • 1,766
  • 2
  • 21
  • 35

1 Answers1

1

Different sizes will not return the cached image. A new image is requested from the resize server if the same sized images does not exist in the cache.

astroanu
  • 3,901
  • 2
  • 36
  • 50
  • 1
    Also i have to mention this trick i use. Each time i make a release i upgrade the cdn version in my config. when requesting a file i append a "?cv=md5_of_cdn_version_number" This way each time the cdn is upgraded a new file is cached. This is handy wen caching js files. – astroanu Apr 03 '14 at 16:46