Displaying 9 results from an estimated 9 matches for "expires_in".
Did you mean:
expires_at
2010 Apr 22
7
Making ActiveSupport::Cache consistent
...cts/8994-ruby-on-rails/tickets/4452
I have recently been working on some gems that utilize
ActiveSupport::Cache and ran into some issues with the different
implementations handling the same functionality differently. One of
the issues was that I couldn''t rely on expiring entries with
the :expires_in option. MemCacheStore takes this option on a write,
while FileStore takes it on a read, and MemoryStore ignores it all
together so that the cache will just grow until you run out of memory.
I ended up doing a pretty large refactoring of ActiveSupport::Cache to
provide universal support for some op...
2006 Feb 16
2
Making the browser cache an action
Hi!
What HTTP headers do I have to sent to make the browser cache the
output of an action?
I tried:
request.delete(''Cache-control'') but no luck.
It''s an action that sends an image to the browser, hence I need that.
Thanks,
Rob
2012 Nov 03
1
Volatile cache keys with Rails and Redis
...using ActiveModel''s "cache_key":
<%= cache @post do %>
The cache-key will be something like views/posts/744-20120613070958 . When
the post is updated, and therefore gets a new cache-key, what happens to
the old one? Will it just sit there forever? Do I need to add an
`expires_in` option to every cache call, just to make sure it gets cleaned
up every once in a while?
<%= cache @post, expires_in: 1.month do %>
Thanks,
Bryan
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, sen...
2008 Nov 19
3
Rails.cache and problem with model id?
I have the following:
MODEL:
def self.get_tag_cloud
Rails.cache.fetch(''fetish_tag_cloud'', :expires_in => 1.hour) do
find(:all, :conditions => [ "approved_for_tag_cloud = true"], :order
=> "LTRIM(name)")
end
end
CONTROLLER:
def index
@fetishes = Fetish.get_tag_cloud
end
VIEW:
....
<% @fetishes.each do |fetish| -%>
<li><%= link_to fe...
2010 Sep 17
0
ruby's oauth2 grant_type
...DER BY a.attnum
Oauth error: invalid grant_type
Rendered text template (0.0ms)
Completed 400 Bad Request in 112ms (Views: 37.9ms | ActiveRecord:
178.2ms)
and from client
Started GET "/users/oauth/accounts/callback?
code=d264c2496d0dc5c494b7269f2f9e4c30cd55a571b6944d3231f63577acd12b1b&&expires_in=3599"
for 127.0.0.1 at 2010-09-17 00:17:44 +0400
Processing by Devise::OauthCallbacksController#accounts as HTML
Parameters:
{"code"=>"d264c2496d0dc5c494b7269f2f9e4c30cd55a571b6944d3231f63577acd12b1b",
"expires_in"=>"3599"}
Completed in 343ms...
2009 May 26
2
memcache for variables
hey,
for performance reasons i want to cache (template) variables using
memcache, making access to data easy in templates by using a simple
syntax like <%=users(2).name%>. this actually should tell the view to
load the field ''name'' from the model/table ''users'' with id=2. it first
tries memcache and if not found, loads the data from the and stores it
in
2005 Dec 16
0
caching rails generated images
Hello,
I use Ruby on Rails to generate images, which are delivered via
mod_fastcgi to apache2.
These images should be cached using mod_cache and mod_disk_cache.
But it does not work.
In Rails I set my http headers like this:
expires_in 30.hours, :private => false
@response.headers[''Last-Modified''] = im.serie.received
@response.headers[''Content-Length''] = data.size
send_data data, :type => ''image/png'', :disposition => ''inline''
The...
2009 Mar 14
2
Rails, lighttpd and the Expires header
I have a controller that serves up images from a different location
from /public/images/ by using send_file or send_data on /media/thumbs/
38 for example
In lighttpd I have:
expire.url = ( "/media/" => "access 10 years",
"/stylesheets/" => "access 10 years" ,
"/javascripts/" => "access 10 years",
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first,
but then it happened that I''ve faced two gotchas, one from CoffeeScript
and one from Rails itself.
I have something like this:
routes.rb
post ''/fields/:id.:format'' => ''fields#show'', as: :field,
constraints: {id: /\d+/}
post ''/fields/remove/:id''