How can I selectively clear the cache for Sinatra + Nginx + Phusion Passenger?

I have a modular Sinatra app running on nginx with Phusion Passenger. When I alter my app (and in particular, some YAML files which are used to generate pages), I'd like to be able to clear only the parts of my cache that are affected (and leave evertyhing else in /public alone--I know I can just clean out the whole cache, but I was hoping not to).


-------------Problems Reply------------

you could:

  1. set up 2 cachezone's in nginx with 2 proxy_cache_path directive in your ninx http block (see for specifics)
  2. then refer to the defined zone-names in proxy_cache directives in your location blocks

you can then clear just the cache for the yaml-generated stuff

Category:caching Views:1 Time:2010-10-05

Related post

  • Phusion Passenger/ruby 1.9.3/rails 3.1.3 / [ASYNC BUG] thread_timer: select 2011-12-05

    I just upgraded to Ruby 1.9.3-p0 and Rails 3.1.3. And then I re-installed Phusion Passenger with support for nginx. Now nginx is recording the following error on every page access: [ASYNC BUG] thread_timer: select EBADF ruby 1.9.3p0 (2011-10-30) [x86

  • Fastest alternative to Datatable.Select() to narrow cached data? 2009-09-28

    Stack Overflowers: I have a search function on my company's website (based on .NET 2.0) that allows you to narrow the product catalog using up to 9 different fields. Right now, after you make your selections on the frontend I am building a dynamic qu

  • Postgres + Select query from Cache 2011-04-05

    I was wondering if Postgres had a feature like SQL_CACHE in mySQL. For example in mySQL I can do a query like "SELECT SQL_CACHE Product_ID, Product_Name, Product_Sku FROM Products" I want to know if I can do something similar in Postgres. -----------

  • Select elements in cached jQuery object 2011-06-18

    Assume we were passed the following element: var cachedElement = $('<div><p>Some text</p></div><aside>Some more text</aside>'); If I know what is in the element, I can easily traverse it. For example, to find the d

  • Selective Disable APC caching 2012-12-05

    I installed APC on my VPS and it works great with W3 Cache wordpress plugin. My problem is that there is one database in MySQL which is pinged by client end every few seconds to see if there are new updates. These db contains certain time sensitive i

  • Selecting an appropriate cache mechanism 2010-02-28

    My setup: 4 webservers Static content server (NFS mount) 2 db servers 2 "do magic" servers An additional 8 machines designated multi-purpose. I'm writing a wrapper for three caching mechanisms so that they can be used in a somewhat normalized manner:

  • Where are 802.1x credentials stored if you select the option "cache user information for subsequent connections to this network" for Windows 7? 2015-01-26

    I found this article for Windows XP, which points to a registry key. I couldn't find a similar answer to Windows 7. --------------Solutions------------- Hi, The issue you posted would be better suited in the Tec

  • How to reset Phusion passenger Ruby on Rails cache? 2011-06-17

    How can I remove the cache of my rails webapp ? I'm going CRAZY ! --------------Solutions------------- Have you try this? Rails.cache.clear You maybe using some other cache store, if so rake tmp:cache:clear will do nothing since no cached on the file

  • Phusion passenger code being cached? 2011-10-15

    I was adding some updates to my rails application, as well as upgrading from 3.0.4 to 3.1.1. I then ran into some errors. I was using the request.request_uri method, which threw an error. Once i corrected it locally, i pushed up my code. However even

  • Posting a large body crashes our stack - but only in production mode? 2009-10-10

    Our Rails application has two environments that we deploy to servers a Staging environment and the default Production environment. The staging.rb file is a copy of the production.rb form the config/environments folder. The difference between the two

  • "Cached Item Was Locked" causing Select Statement in Hibernate 2009-03-13

    I am having trouble with getting some caching to work with hibernate exactly the way I would like. I created some example code to replicate this problem I am having. I have one object that contains instances of itself. For instance, a Part that is ma

  • selective node update to cached xml feed and/or feedreader 2010-08-13

    Over at rsscache they offer a mechanism that caches your website's feed. They claim that if a new node gets added to your feed, instead of flushing and refilling the entire cache(for the current user, they proably do for new users), they only send th

  • How do I get SQLite to cache results of a select command 2011-03-10

    I am running a web application with a backend SQLite database that solely performs read operations. Users connect to the database, search for entries via a select command, and view the results in a browser. But, the select is quite time-consuming bec

  • varnish vcl purging cache selectively 2012-04-07

    So i am using varnish for the first time. i have spent quite some time reading on how it works, but i am unable to figure out how do i selectively purge the cache. like say i have a url like this /?account=123& and another like /?ac

  • Rails Caching - XML Files? 2009-04-01

    My Rails application is running on a VM. The VM's performance is just fine with static pages. In fact, I'm running another site using Apache virtual hosting that is just serving up static HTML files and the response is adequate. However, my Rails app

  • Clear cache in SqlDataSource 2009-06-01

    I need to manually clear the cache on a SqlDataSource with caching enabled. I've tried setting EnableChaching = false, and CacheDuration = 0 (as well as = 1) and none seem to expire the content already in the cache - although they do seem to prevent

  • Is it a good idea to cache data from web services into a database? 2010-03-08

    Let's assume that Stackoverflow offers web services where you can retrieve all the questions asked by a specific user. A request to get all question from user A can result in the following json output: { { "question": "What is rest?", "date_created":

  • UITableView Multiple Selection 2010-06-14

    How can I add a UITableView into my View-Based Application where the user will tap on more than one cell, and it will become selected, exactly like the Clock app's "New Alarm" setting named "Repeat" (Clock>Alarms> + >Repeat), and how can I g

  • How to overcome caching problem of jsf? 2010-07-28

    I have 7 drop down in my jsp(Using JSF tag-Select One Menu), 2 drop downs are dependent on other 2 drop downs. The scope of my Managed Bean is session.I have a single page and my result is a graph/table depending on the drop down menu selection. But

Copyright (C), All Rights Reserved.

processed in 0.169 (s). 11 q(s)