File: yaml.rb

package info (click to toggle)
libinnate-ruby 2010.07-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 812 kB
  • ctags: 621
  • sloc: ruby: 4,242; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'yaml/store'

module Innate
  class Cache
    # Keeps every cache in a separate file like this:
    # /tmp/innate-cache-yaml/delta-manveru-session.yaml
    #
    # The YAML cache is not safe for use between multiple processes, it is also
    # very slow compared to other caches, so generally the use of it is
    # discouraged.
    class YAML
      include Cache::API
      include Cache::FileBased

      STORE = ::YAML::Store
      DIR = 'innate-cache-yaml'
      EXT = '.yaml'
    end
  end
end