org.apache.ivy.core.cache

Class ModuleDescriptorMemoryCache

class ModuleDescriptorMemoryCache extends Object

Cache ModuleDescriptors so that when the same module is used twice (in multi-module build for instance), it is parsed only once. This cache is has a limited size, and keep the most recently used entries. The entry in the cache are invalidated if there is a change to one variable used in the module descriptor.
Constructor Summary
ModuleDescriptorMemoryCache(int size)
Create a cache of the given size
Method Summary
ModuleDescriptorget(File ivyFile, ParserSettings ivySettings, boolean validated, ModuleDescriptorProvider mdProvider)
ModuleDescriptorgetStale(File ivyFile, ParserSettings ivySettings, boolean validated, ModuleDescriptorProvider mdProvider)
Get the module descriptor from the mdProvider and store it into the cache.

Constructor Detail

ModuleDescriptorMemoryCache

public ModuleDescriptorMemoryCache(int size)
Create a cache of the given size

Parameters: size

Method Detail

get

public ModuleDescriptor get(File ivyFile, ParserSettings ivySettings, boolean validated, ModuleDescriptorProvider mdProvider)

getStale

public ModuleDescriptor getStale(File ivyFile, ParserSettings ivySettings, boolean validated, ModuleDescriptorProvider mdProvider)
Get the module descriptor from the mdProvider and store it into the cache.