Changeset 1354 for lang/ruby

Show
Ignore:
Timestamp:
11/13/07 01:48:46 (6 years ago)
Author:
cho45
Message:

lang/ruby/ekfloras/plugins/full_cache.rb:

ちゃんと reindex でクリアされていなかったのを修正
POST で該当 path のキャッシュをクリアするように (comment プラグイン対策)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/ekfloras/plugins/full_cache.rb

    r1352 r1354  
    2222                end 
    2323 
     24                # $stderr.puts @ekfloras.path_info.to_s 
    2425                if @cache[@ekfloras.path_info.to_s] && 
    2526                   @ekfloras.cgi.params.empty? 
     
    3940                                # @ekfloras.stash.debug = "Make FullCache" 
    4041                                @cache[@ekfloras.path_info.to_s] = @ekfloras.out 
    41                                 cache = Pathname.new(CACHE_FILE) 
    42                                 cache.open("wb") {|f| Marshal.dump(@cache, f) } 
    4342                        end 
     43                        if @ekfloras.cgi.request_method.upcase == "POST" 
     44                                @cache.delete @ekfloras.path_info.to_s 
     45                        end 
     46                        cache = Pathname.new(CACHE_FILE) 
     47                        cache.open("wb") {|f| Marshal.dump(@cache, f) } 
    4448                end 
    4549        end