CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 07 Aug 2025 05:46:04 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100314022913
location: https://web.archive.org/web/20100314022913/https://github.com/ryanb/render-caching
server-timing: captures_list;dur=0.991032, exclusion.robots;dur=0.088372, exclusion.robots.policy;dur=0.075350, esindex;dur=0.011146, cdx.remote;dur=91.272375, LoadShardBlock;dur=193.958630, PetaboxLoader3.datanode;dur=69.269958, PetaboxLoader3.resolve;dur=43.251889
x-app-server: wwwb-app204
x-ts: 302
x-tr: 367
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app204; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 07 Aug 2025 05:46:04 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sun, 14 Mar 2010 02:29:12 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "308b5457415b8ac008d211fe43bbfd7e"
x-archive-orig-x-runtime: 446ms
x-archive-orig-content-length: 22856
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 14 Mar 2010 02:29:13 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 23 Dec 2008 12:04:11 GMT", ; rel="prev memento"; datetime="Sat, 16 Jan 2010 00:31:06 GMT", ; rel="memento"; datetime="Sun, 14 Mar 2010 02:29:13 GMT", ; rel="next memento"; datetime="Fri, 09 Oct 2015 21:16:39 GMT", ; rel="last memento"; datetime="Thu, 29 Oct 2020 03:14:55 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_14_20100313232046_crawl100-c/51_14_20100314022841_crawl101.arc.gz
server-timing: captures_list;dur=0.791290, exclusion.robots;dur=0.028954, exclusion.robots.policy;dur=0.013022, esindex;dur=0.019150, cdx.remote;dur=35.508399, LoadShardBlock;dur=296.945414, PetaboxLoader3.datanode;dur=188.056246, PetaboxLoader3.resolve;dur=258.104502, load_resource;dur=185.044726
x-app-server: wwwb-app204
x-ts: 200
x-tr: 589
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
ryanb's render-caching at master - GitHub
ryanb / render-caching
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Loading commit data... ![]() |
|
![]() |
CHANGELOG | ||
![]() |
LICENSE | ||
![]() |
Manifest | ||
![]() |
README | ||
![]() |
Rakefile | ||
![]() |
TODO | ||
![]() |
lib/ | ||
![]() |
render-caching.gemspec | ||
![]() |
script/ | ||
![]() |
spec/ | ||
![]() |
tasks/ |
README
= Render Caching Cache render calls in Rails controllers. == Install First install the gem. gem install ryanb-render-caching --source=https://gems.github.com Then specify it in your Rails config. config.gem 'ryanb-render-caching', :lib => 'render_caching', :source => 'https://gems.github.com' Rails 2.1 or later required. == Usage This gem adds the render_with_cache method to all controllers. Call this inside of an action to cache the view. def show @user = User.find(params[:id]) render_with_cache end This will cache the full rendered contents into a key matching the URL path (similar to action caching). You can change this key by simply passing any parameter. def show @user = User.find(params[:id]) render_with_cache @user.cache_key end Cache key is a method supplied by Rails. This includes the updated_at time which will give you an auto-expiring cache when the user record is updated. You can also supply a block to the render call which will only get executed if there is no cache. Here is a good place to do any custom render calls. def show @user = User.find(params[:id]) render_with_cache @user.cache_key do render :layout => false end end == Development This project can be found on github at the following URL. https://github.com/ryanb/render-caching/ If you would like to contribute to this project, please fork the repository and send me a pull request.