Created
June 29, 2011 21:12
-
-
Save ivanyv/1054992 to your computer and use it in GitHub Desktop.
Exclusively cache Rails GET requests on nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.action_controller.page_cache_directory = Rails.root.join('public', 'cache-GET') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inside the server directive: | |
location @rails { | |
passenger_enabled on; | |
} | |
try_files /cache-$request_method$uri /cache-$request_method$uri.html @rails; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment