Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 3584 Bytes
1 | Rack::Cache |
2 | =========== |
3 | |
4 | Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for |
5 | Rack-based applications that produce freshness (Expires, Cache-Control) and/or |
6 | validation (Last-Modified, ETag) information: |
7 | |
8 | * Standards-based (RFC 2616) |
9 | * Freshness/expiration based caching |
10 | * Validation (If-Modified-Since / If-None-Match) |
11 | * Vary support |
12 | * Cache-Control: public, private, max-age, s-maxage, must-revalidate, |
13 | and proxy-revalidate. |
14 | * Portable: 100% Ruby / works with any Rack-enabled framework |
15 | * Disk, memcached, and heap memory storage backends |
16 | |
17 | For more information about Rack::Cache features and usage, see: |
18 | |
19 | http://tomayko.com/src/rack-cache/ |
20 | |
21 | Rack::Cache is not overly optimized for performance. The main goal of the |
22 | project is to provide a portable, easy-to-configure, and standards-based |
23 | caching solution for small to medium sized deployments. More sophisticated / |
24 | high-performance caching systems (e.g., Varnish, Squid, httpd/mod-cache) may be |
25 | more appropriate for large deployments with significant throughput requirements. |
26 | |
27 | Installation |
28 | ------------ |
29 | |
30 | From Gem: |
31 | |
32 | $ sudo gem install rack-cache |
33 | |
34 | With a local working copy: |
35 | |
36 | $ git clone git://github.com/rtomayko/rack-cache.git |
37 | $ rake package && sudo rake install |
38 | |
39 | Basic Usage |
40 | ----------- |
41 | |
42 | Rack::Cache is implemented as a piece of Rack middleware and can be used with |
43 | any Rack-based application. If your application includes a rackup (`.ru`) file |
44 | or uses Rack::Builder to construct the application pipeline, simply require |
45 | and use as follows: |
46 | |
47 | require 'rack/cache' |
48 | |
49 | use Rack::Cache, |
50 | :metastore => 'file:/var/cache/rack/meta', |
51 | :entitystore => 'file:/var/cache/rack/body', |
52 | :verbose => true |
53 | |
54 | run app |
55 | |
56 | Assuming you've designed your backend application to take advantage of HTTP's |
57 | caching features, no further code or configuration is required for basic |
58 | caching. |
59 | |
60 | Using with Rails |
61 | ---------------- |
62 | |
63 | Add this to your `config/environment.rb`: |
64 | |
65 | config.middleware.use Rack::Cache, |
66 | :verbose => true, |
67 | :metastore => 'file:/var/cache/rack/meta', |
68 | :entitystore => 'file:/var/cache/rack/body' |
69 | |
70 | You should now see `Rack::Cache` listed in the middleware pipeline: |
71 | |
72 | rake middleware |
73 | |
74 | See the following for more information: |
75 | |
76 | http://snippets.aktagon.com/snippets/302 |
77 | |
78 | Links |
79 | ----- |
80 | |
81 | Documentation: |
82 | http://tomayko.com/src/rack-cache/ |
83 | |
84 | Mailing List: |
85 | http://groups.google.com/group/rack-cache |
86 | |
87 | GitHub: |
88 | http://github.com/rtomayko/rack-cache/ |
89 | |
90 | License |
91 | ------- |
92 | |
93 | Copyright (c) 2008 Ryan Tomayko <http://tomayko.com/about> |
94 | |
95 | Permission is hereby granted, free of charge, to any person obtaining a copy |
96 | of this software and associated documentation files (the "Software"), to |
97 | deal in the Software without restriction, including without limitation the |
98 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
99 | sell copies of the Software, and to permit persons to whom the Software is |
100 | furnished to do so, subject to the following conditions: |
101 | |
102 | The above copyright notice and this permission notice shall be included in |
103 | all copies or substantial portions of the Software. |
104 | |
105 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
106 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
107 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
108 | THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
109 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
110 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |