# Invalidate cache entry using X-Accel-Expires

**URL:** <https://www.ruby-forum.com/t/invalidate-cache-entry-using-x-accel-expires/216201>\
**Category:** NGINX\
**Created:** [January 29, 2012, 6:16pm UTC](https://www.ruby-forum.com/t/invalidate-cache-entry-using-x-accel-expires/216201 "2012-01-29T18:16:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 29, 2012, 6:16pm UTC](https://www.ruby-forum.com/t/invalidate-cache-entry-using-x-accel-expires/216201/1 "2012-01-29T18:16:37Z")

</div>

Hello,

Right now I’m invalidating cache entries using X-Accel-Expires 1  
response  
with 302 redirect of the resource to itself. I want to ask for your  
opinion  
on two issues:

1. Do you see other response code (other than 302) more suitable for  
this  
action?
2. I think that X-Accel-Expires 0 should also invalidate the cache  
entry,  
beside not caching item at all, since it says this resource should  
expire  
in 0 seconds. What’s your opinion on this?

Thanks!  
Calin
