Class: ProjectCache

Inherits:
Object
  • Object
show all
Includes:
Cache
Defined in:
lib/project_cache.rb

Constant Summary

Constants included from Cache

Cache::BRANCH_CACHE_BASE, Cache::CACHE_BASE_PATH, Cache::OBJECT_CACHE_BASE, Cache::REMOTES_REGEX

Instance Method Summary collapse

Methods included from Cache

#branch_path, #ensure_directory, #index_commit, #index_commits, #last_indexed_commit, #object_rel_path, #persist?, #read, #read_object, #write, #write_object

Constructor Details

#initialize(base_path) ⇒ ProjectCache

Returns a new instance of ProjectCache.



6
7
8
# File 'lib/project_cache.rb', line 6

def initialize(base_path)
  @base_path = base_path
end

Instance Method Details

#cache_path(key) ⇒ Object



10
11
12
# File 'lib/project_cache.rb', line 10

def cache_path(key)
  File.join(@base_path, Cache.cache_path(key))
end