Brightbox
  • Home
  • Pricing & Sign up
  • Why Brightbox?
  • Products & Services
  • FAQs
  • About
  • Blog
  • Wiki
  • Forums
  • Contact
Blog RSS feed
twitter_banner

Flickr


more images...

Recent Posts

  • Rails 3 has landed!
  • New: Dedicated MySQL services
  • Ruby Enterprise 1.8.7-2010.02 Packages for Ubuntu Hardy & Lucid
  • Ubuntu 10.04 LTS "Lucid" now available
  • New: Automatically add SSH keys to new Brightboxes

Archives

  • September 2010 (1)
  • August 2010 (1)
  • June 2010 (3)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (2)
  • February 2010 (3)
  • January 2010 (6)
  • December 2009 (4)
  • November 2009 (6)
  • October 2009 (2)
  • September 2009 (3)
  • August 2009 (4)
  • July 2009 (3)
  • June 2009 (3)
  • May 2009 (5)
  • April 2009 (4)
  • March 2009 (4)
  • February 2009 (3)
  • January 2009 (6)
  • December 2008 (8)
  • November 2008 (7)
  • October 2008 (8)
  • September 2008 (3)
  • August 2008 (5)
  • July 2008 (1)
  • June 2008 (4)
  • May 2008 (4)
  • April 2008 (3)
  • March 2008 (3)
  • February 2008 (3)
  • January 2008 (4)
  • December 2007 (4)
  • November 2007 (3)
  • October 2007 (1)
  • August 2007 (7)
  • July 2007 (1)
  • June 2007 (3)

Popular tags

    • announcements
    • apache
    • beta
    • brightbox
    • deployment
    • hardy
    • packages
    • passenger
    • performance
    • phusion
    • rails
    • ruby
    • ruby on rails
    • security
    • ubuntu

Tag Cloud

announcements apache beta brightbox brightbox gem conference control panel dapper debian deployment events features gem hardy hosting launch leeds linux london lucid maintenance modrails mod_rails mysql network nginx packages passenger performance phusion pricing rack rails rails hosting ruby ruby on rails security staff team tech ubuntu uk updates upgrade xen

Posts tagged ‘filesystem’

Expiring an entire page cache tree atomically 16 Nov 09

As you’ll all know, Rails has page caching baked right in – the first time an action is hit, it writes a html file of the result to the filesystem. Subsequent hits are served direct from the html file at high speed by the web server without ever involving your Rails app.

Expiring the cache is just a case of deleting the html file. But what if you want to expire an entire tree of cache files? Say you change something in a header or footer, so every single page needs expiring at once.

The usual way to do this is to just delete the entire page cache tree, with FileUtils.rm_rf.  This works pretty well, but with a big tree you’ll get strange behaviour under high load due to concurrent access.  Whilst your rm_rf process is deleting the tree, file by file, your webserver will still be looking in there for page cache files and Rails will still be trying to write them.
Read the rest of this entry »

Posted 16 November 2009 by John Leach • 1 comment

atomic+ cache+ caching+ delete+ expire+ filesystem+ html+ page cache+ rails+ ruby


Recent blog posts

  • Rails 3 has landed!
    1 day ago
  • New: Dedicated MySQL services
    14 days ago
  • Ruby Enterprise 1.8.7-2010.02 Packages for Ubuntu Hardy & Lucid
    2 months ago
  • Ubuntu 10.04 LTS “Lucid” now available
    3 months ago
  • New: Automatically add SSH keys to new Brightboxes
    3 months ago
  • Ruby Enterprise 1.8.7-2010.01 Packages for Ubuntu Hardy & Lucid
    3 months ago

Join our email list

Flickr (more...)

RSS feeds

Blog feed

Flickr feed

Recent Wiki updates

System Status feed




Brightbox Partners and Vendors

Wiki | Forums | Terms & Conditions | Privacy | Site Map

Copyright © 2010 Brightbox Systems Ltd. All rights reserved