Library: OSP
Package: Util
Header: Poco/OSP/CodeCache.h
CodeCache is a utility class that manages the code cache directory where the shared libraries of resolved bundles are kept.
Member Functions: clear, hasLibrary, installLibrary, pathFor, uninstallLibrary
CodeCache(
const std::string & path
);
Creates the CodeCache, using the given path.
If the cache directory does not exist, it is created.
~CodeCache();
Destroys the CodeCache.
void clear();
Clears the cache by removing the entire cache directory.
bool hasLibrary(
const std::string & name
);
Returns true if a library with the given name is stored in the code cache.
The name must not contain an filename extension.
void installLibrary(
const std::string & name,
std::istream & istr
);
Installs the library with the given name, which must not contain an extension, into the code cache.
std::string pathFor(
const std::string & name
);
Returns the full path for the library with the given name.
void uninstallLibrary(
const std::string & name
);
Removes the library with the given name from the cache directory.