26 Jan '15, 12pm

Take Control of Your HTTP Caching in Rails

The Rails fresh_when method is a powerful tool for conditionally caching resources via HTTP. However there are some pitfalls. For one, fresh_when only supports the default render flow in a controller; if a client’s cache is not fresh, it will just render the related view. We cannot utilize things like render json: . Fortunately, Rails provides us with more tools to work with HTTP conditional caching. Some of the basics behind HTTP conditional caching are assumed in this post. If you haven’t already, or you just need a refresher take a look at Introduction to Conditional HTTP Caching with Rails . Let’s work with a simple Rails blog application which renders posts as JSON. # app/controllers/posts_controller.rb class PostsController < ApplicationController def show @post = Post.find(params[:id]) render json: @post end end # config/routes Rails.application.routes.draw do resou...

Full article: http://robots.thoughtbot.com/take-control-of-your-http-ca...

Tweets

Keep your every step charged with energy. The #...

footlocker.eu 27 Jan '15, 12pm

਍ℼ佄呃偙⁅瑨汭ാ㰊瑨汭砠汭獮∽瑨灴⼺眯睷眮⸳牯⽧㤱㤹砯瑨汭㸢਍格慥⁤摩∽瑣ぬ弰效摡∱㰾楴汴㹥਍愉楤慤⁳⁄潒敳㔠䈠潯瑳⠠潈敭
‭潆瑯䰠捯敫൲㰊琯瑩敬㰾敭慴椠㵤挢汴〰浟瑥䑡獥≣渠浡㵥搢獥牣灩楴湯•潣瑮湥㵴愢楤慤⁳⁄潒敳㔠䈠潯瑳⠠潨敭∩⼠㰾敭慴椠㵤...

faraday-http-cache (1.0.0): Middleware to handl...

rubygems.org 27 Jan '15, 8pm

RubyGems.org is the Ruby community’s gem hosting service. Instantly publish your gems and install them. Use the API to int...

The Joys of SSD Caching In the end, I was only able to stress the system using some artificial benchmarks and pl...

The Joys of SSD Caching In the end, I was only ...

electronicdesign.com 25 Jan '15, 10pm

The first part of this project was adding Super Microcomputer’s (SuperMicro) CSE-M28 Mobile Rack (Fig. 1) to my SuperServe...

Touch Control Improvements Address Industrial N...

eetimes.com 27 Jan '15, 12am

SEATTLE – Next-generation touch controllers from Atmel combine two projective capacitance touch sensing technologies to im...

I couldn't sleep last night, so I brain dumped ...

fngtps.com 26 Jan '15, 11am

Authentication, one of the more mundane parts of a Ruby on Rails application, turns out to be pretty diverse. So what are ...

Take control of your running health with these ...

runnersworld.com 24 Jan '15, 12pm

Each year, studies report that somewhere between one-fifth and one-half of runners get injured. The figure is hard to pin ...

後でもう一回読もうっと〜 Caching with Rails: An overview — ...

edgeguides.rubyonrails.org 20 Jan '15, 10pm

Life would be perfect if we could get away with caching the entire contents of a page or action and serving it out to the ...

Did you spot us at Crystal Peaks yesterday? SL3...

stagecoachbus.com 28 Jan '15, 1pm

Connecting Killamarsh to the Sheffield Supertram Killamarsh > Holbrook Industrial Estate > Sothall > Crystal Peaks Inte...

Modular Rails: What is Modularity?

Modular Rails: What is Modularity?

samurails.com 29 Jan '15, 1pm

Modular programming is a software design technique that emphasises separating the functionality of a program into independ...

Major news: We've launched our Ruby on Rails bl...

skillcrush.com 30 Jan '15, 5pm

There are a few reasons why Rails is so great for beginners. The first reason is simply that Ruby is really great for begi...

New to #rails and #neo4j database? Here is some...

neo4j-ruby.org 06 Feb '15, 11am

create (_6:DrugClass {id: 1, name:"Bronchodilators"}), (_7:DrugClass {id: 2, name:"Corticosteroids"}), (_8:DrugClass {id: ...

.@Sheryo gets inspired by the black #Valentine ...

footlocker.eu 06 Feb '15, 5pm

਍ℼ佄呃偙⁅瑨汭ാ㰊瑨汭砠汭獮∽瑨灴⼺眯睷眮⸳牯⽧㤱㤹砯瑨汭㸢਍格慥⁤摩∽瑣ぬ弰效摡∱㰾楴汴㹥਍按湯敶獲ⵥ畣楰獤ⴠ䘠潯⁴潌正牥਍⼼楴汴㹥洼瑥⁡摩∽瑣ぬ弰敭慴敄捳•慮敭∽敤捳楲瑰潩≮挠湯整瑮∽潣癮牥敳挭灵摩≳⼠㰾敭慴椠㵤挢汴〰浟瑥䭡祥•慮敭∽敫睹...

Take a Look at these Saucony Shadow Original “Cream” -

Take a Look at these Saucony Shadow Original “C...

kicksonfire.com 28 Jan '15, 1am

This all-time classic silhouette from Saucony receives a creamy suede and mesh upper, backed by a navy blue wrapping on th...

The lobster thermidor is beyond a guilty pleasu...

cntraveller.com 25 Jan '15, 4pm

Glasgow's mostly Victorian city centre is said to resemble that of 19th-century New York. Filmmakers love it for this reas...