Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 13
- Log:
Initial import of Typo 2.6.0 sources from a downloaded Tarball.
Typo is a Ruby On Rails based blog engine.
- Author:
- adh
- Date:
- Sat Jul 22 22:25:02 +0100 2006
- Size:
- 607 Bytes
1 | class PageCache < ActiveRecord::Base |
2 | |
3 | cattr_accessor :public_path |
4 | @@public_path = RAILS_ROOT + "/public" |
5 | |
6 | def self.sweep(pattern) |
7 | destroy_all("name like '#{pattern}'") |
8 | end |
9 | |
10 | def self.sweep_all |
11 | destroy_all |
12 | end |
13 | |
14 | private |
15 | |
16 | after_destroy :expire_cache |
17 | |
18 | def expire_cache |
19 | # It'd be better to call expire_page here, except it's a |
20 | # controller method and we can't get to it. |
21 | path = PageCache.public_path + "/#{self.name}" |
22 | |
23 | logger.info "Sweeping #{self.name}" |
24 | delete_file(path) |
25 | end |
26 | |
27 | def delete_file(path) |
28 | File.delete(path) if File.file?(path) |
29 | end |
30 | end |