This file is indexed.

/usr/lib/ruby/1.8/ramaze/cache/lru.rb is in libramaze-ruby1.8 2010.06.18-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#          Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

module Ramaze
  class Cache
    class LRU
      include Cache::API

      OPTIONS = {
        # expiration in seconds
        :expiration => nil,
        # maximum elements in the cache
        :max_count => 10000,
        # maximum total memory usage of the cache
        :max_total => nil,
        # maximum memory usage of an element of the cache
        :max_value => nil,
      }

      # Connect to localmemcache
      def cache_setup(host, user, app, name)
        @store = Ramaze::LRUHash.new(OPTIONS)
      end

      def cache_clear
        @store.clear
      end

      def cache_store(*args)
        super{|key, value| @store[key] = value }
      end

      def cache_fetch(*args)
        super{|key| @store[key] }
      end

      def cache_delete(*args)
        super{|key| @store.delete(key) }
      end
    end
  end
end