similar to: cache problem

Displaying 20 results from an estimated 10000 matches similar to: "cache problem"

2006 Apr 08
2
trouble expiring cached pages
I''m having a bear of a time getting my cached pages to expire. Maybe one of you guys can help me out. I''ll show my sweeper and then my log to show that it "should" be working. class PragmaticSweeper < ActionController::Caching::Sweeper observe Comment def after_save(comment) expire_page(comment.post_id) end private def expire_page(post_id)
2006 Jun 14
1
page caching with custom routes
hi , I''m having problems with expire_page with custom routes i''ll show some code blog_controller --------------- def clear_cache_rss_artikels expire_page url_for(:controller => "xml",:action => "rss_artikels") end this is called when a new article is posted or edited or destroyed xml_controller --------------- class XmlController <
2007 Sep 10
2
expire_page not working
I''ve enabled page caching on a site I''m currently constructing. The sweeper is called upon any changes made to the model, as expected. The sweeper code is as follows: class PersonSweeper < ActionController::Caching::Sweeper observe Person def after_update(person) expire_staff_page end def after_destroy(person) expire_staff_page end def
2008 Apr 01
1
"Undefined method merge" when using sweeper
Hi, I''m trying to use sweepers for the first time and got a problem - I get "undefined method `merge'' for "/signature/ f2d7c7c66450b169.html":String". The "/signature/f2d7c7c66450b169.html" part of the error message is the cached page. Here''s my sweeper: class FooSweeper < ActionController::Caching::Sweeper observe Foo def
2008 Jun 28
5
asset_host?
Hi there, I''m wrapping my head around Facebooker to try and build some integration points between an existing ROR application and facebook. I''ve managed to get FB talking to my app but when I tried to access my ROR app directly I noticed that all requests for images, CSS, and JS files were being made through my callback_url. Commenting out the following line from
2011 Oct 05
2
formtastic / activeadmin
Newbie question: want to following code to migrate to formtastic: <% f.fields_for :assets do |asset_fields| %> <% if asset_fields.object.new_record? %> <p> <%= asset_fields.file_field :asset %> </p> <% end %> <% end %> tried this: f.inputs "Appartment Details" do f.input :assets do |asset_fields|
2012 Dec 18
2
cache-busting non-digest assets in sprockets in development a good idea? should headers in sprockets be configurable?
Just monkey patched Sprockets in our Rails 3.2.9 app to override the Cache-Control header for html assets that we need to tweak more often in development, but that we don''t want to use digests/fingerprinting with: # Sprockets 2.x patch if Rails.env.development? module Sprockets module Server private alias_method :sprockets_headers, :headers def headers(env,
2005 Jun 26
4
calling controller and caching from a sweeper class
[cross-posting to rails and typo lists] Hi, I''m tinkering with the code for typo, a rails-based blog engine. Typo has an XmlController with actions "rss" and "atom" which generate feed.xml files, and it uses a caches_page declaration to cache the files that get generated by those actions. It also has a Sweeper (Observer) class that expires those cached files when a
2011 Nov 26
1
ActionController::RoutingError (No route matches [GET] "/image.jpg"):
I am using rails 3.1.3. Inside config/ application -> config.assets.enabled = true Inside development.rb -> config.assets.compress = false Inside production.rb -> config.serve_static_assets = false; config.assets.compile = false I have images placed in assets/images. If i do localhost:3000/assets/ image I get the image in the browser, but unfortunately, on the browser i am
2007 May 26
11
RSpec
Hi RSpec Mailing list, I''m new to RSpec and I am trying to get it running with the caboo.se sample rails app. I installed the current version of rspec with rspec_on_rails I tried to run rake spec but received: 330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec (in /Users/multimedia/Desktop/restful_auth_rspec)
2007 Feb 14
4
cache sweeper not getting called
Hi, I''ve started to implement page caches but I''ve hit a brick wall getting a sweeper to clear the cache when needed. It seems that any models that I tell it to observe aren''t being observed properly. If I add the sweeper to a controller the initialize method runs, but no matter what I do the after_save/after_update callbacks aren''t running. Also if I try to
2011 Nov 26
3
Asset pipeline giving me hard time. Please help !!! - (rails 3.1.3)
I am using rails 3.1.3. Inside config/ application -> config.assets.enabled = true Inside development.rb -> config.assets.compress = false Inside production.rb -> config.serve_static_assets = false; config.assets.compile = false I have images placed in assets/images. If i do localhost:3000/assets/ image I get the image in the browser, but unfortunately, on the browser i am
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''
2008 Jan 31
3
Using facebooker AND Haml/Sass
For anyone using both and encountering trouble with stylesheets (specifically, the paths being incorrect in production mode)... Removing facebooker solves the issue. But I bet you don''t want to do that, eh? So, simply setting ActionController::Base.asset_host = '''' also works like butter. I''m not 100% clear on why asset_host has anything to do with
2006 Apr 29
1
Caching foor starters
Hi there... I have some experience in building web applications but all of them have been intranet apps so I have never had to think about things like caching. Actually my experience with caching has more been in the area of removing it since it just gets in the way for a intranet app with 10-100 users. But now I am writing a site which might stand or fall by the quality of it''s
2006 Jul 23
2
how to paginate child records
hi i know i can do: @customer_pages, @customers = paginate :customers, :per_page => 8 but these customers have helpdesk calls which are child records. I hoped i could do something like paginate customers.calls, but dat doesn''t work what is the best way to get a paginated list of child records? remco -- Posted via http://www.ruby-forum.com/.
2008 Mar 10
15
facebooker is rewriting URLs even off of facebook canvas
The URLs for CSS/JS files are being rewritten to the address specified in the tunnel even when outside of the facebook canvas. Is anyone else having this problem?
2006 Mar 09
0
Caching problem: expire_page not working
Hi all, I''m new to rails and I''ve run in to a rather insidious bug. In development (with caching turned on in development.rb), my app successfully caches action "index" in controller "view": class ViewController < ApplicationController caches_page :index def index # do the stuff that index does end end I''ve got a sweeper
2006 May 08
10
Apache 2.2, ProxyPass and HTTPS
Hi all, I''m currently trying to get Mongrel running my app whilst fronted by apache 2.2 in a sub-directory via https. A bit convoluted I''ll grant you but necessitated by existing systems. The pertinent parts of my httpd.conf: <VirtualHost 123.123.123.123:12345> #historic choice of random port number DocumentRoot /var/www/admin ServerName admin.example.com:12345
2006 Mar 24
2
Expiring cached actions outside of ActionController
In the site I''m building, my models are *almost* never updated within ActionController-- all new data comes in via command line scripts manipulating ActiveRecord directly. Can anyone offer any hints about expiring cached actions without Sweeper? -Ross