# NEWBIE: cache swf content?

**URL:** <https://www.ruby-forum.com/t/newbie-cache-swf-content/222843>\
**Category:** NGINX\
**Created:** [September 12, 2012, 3:29pm UTC](https://www.ruby-forum.com/t/newbie-cache-swf-content/222843 "2012-09-12T15:29:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [September 12, 2012, 3:29pm UTC](https://www.ruby-forum.com/t/newbie-cache-swf-content/222843/1 "2012-09-12T15:29:22Z")

</div>

I am running a few webapps on Tomcat, and placing nginx in front for  
SSL, content caching and to remove some of the load from Tomcat where  
possible (currently testing v1.2.3 on CentOS 6.x).

I have most of the configuration working well (nginx is very slick, and  
pretty easy to configure). However, I have some static content like swf  
(flash) files that are served to the client browser with parameters, and  
I think this is why nginx is not caching them. For example,  
“…/testflash.swf?dt=0123456789” (dt is typically a timestamp, but is  
a unique identifier, nonetheless). Since this swf file does not  
actually change (incredibly rarely, in a major “upgrade”, and I would  
purge the cache at that point), is there a way to tell nginx to cache it  
regardless of the url-parameters appended?

These files, and most of the other content, have ETag’s and  
Last-Modified-Date (both). In this case there is no explicit  
Cache-Control in the header.

Related question: If content has an ETag from the source server (the  
content that nginx fetches already has an ETag), is there a way to force  
nginx to cache the content based on that ETag? I _think_ this is  
different to the ETag support that is coming in the \> 1.3.3 versions, as  
that seems to say that it will actually add tags for content. In this  
case, I would’ve expected nginx to cache any content with an ETag and  
especially with a Last-Modified-Date when no explicit Cache-Control  
header was provided.

Thanks for dealing with my newbie questions, I appreciate your time.  
-AJ
