Skip to main content
Participant
January 4, 2013
Question

mod_cache not working?

  • January 4, 2013
  • 1 reply
  • 1072 views

I've enabled mod_cache and see the cacheroot directory populating with cached data. But, when I request on-demand hds segments that have been previously request, I get a 200 response, not the expected 304 response.

I've installed AMS 5 on Windows Server 2008 R2 VirtualBox virtual machine. The only configuration change that I have made after the default install is to turn on cacheing.

Am I correct in assuming I should get a 304 and not the 200? If so, what might be causing mod_cache to not return the cached data?

Thanks.

This topic has been closed for replies.

1 reply

Adobe Employee
January 4, 2013

It can only return 304 if the request has "if-modified-since" header set. Otherwise it will return the 200. You can probably alleviate the log level to debug or info to get the mod_cache logs and find out that whether request is being served from mod_cache or hds module.

Note if 304 is the response then, server is effectively saving the uploading badwidth also (i.e it is not serving the data.. just telling the upper proxy or browser that data has not changed from the previous request).. It is returned if the same client makes the request again with "if-modified-since" date and time.

A new client without "if-modified-since" will always be returned with the data and response code 200. Here by enabling the cache, you are saving the regeneration of the fragment and thus the CPU and memory of the system.

jccrosbyAuthor
Participant
January 4, 2013

Thanks for the response Nitin.

Just so I understand. We are using a Flash Client for playback and there-fore can't use "if-modified-since" regardles of it being a new client or not. With the cahce enabled we will still save memory and cycles on fragmenet generation, but won't get a 304 and will receive a 200 instead. Is there some way to verify that the cached content is being returned from the client (or are the logs the only way to verify)?

Thanks again.