News for hackers. Stuff that matters.
Re:A Full Web Service with HTTP caching in 7 lines by m_eiman on Tuesday February 24, 2009 @02:37PM (#493471)
Am I the only one who's tired of these "X in Y lines of code!" things? It's obviously always many more lines of code, just hidden away from view, so meh!

Come back when you've actually done some REAL WORK in insanely tight code, not just imported this and that lib.

Re:A Full Web Service with HTTP caching in 7 lines by aditya on Tuesday February 24, 2009 @03:23PM (#493524)
Agreed, there's nothing here that couldn't have been done 5 years ago with perl and CPAN. But, I think this post is relevant for two big reasons:

1. Sinatra and Rack are amazing lightweight alternatives (especially for web services) compared to the giantness that is Rails.

2. Rack::Cache is seriously awesome (http://tomayko.com/src/rack-cache/) and deserves more attention...

Re:A Full Web Service with HTTP caching in 7 lines by aaronblohowiak on Tuesday February 24, 2009 @04:17PM (#493610)
Rack::Cache is neato for development, but you're better served using Varnish for production -- it acts as a caching reverse proxy to multiple machines, is insanely fast and battle-tested, it can be configured to serve stale content if the backend becomes unreachable, it supports ESI, and more!

And yes, Sinatra & Rack are super cool.