|
CD-ROM Cache ModuleCDCache has been designed to provide totally transparent caching of files retrieved from CD-ROM. The module can use both memory and a disc-based file to provide a two-stage cache. The user is able to specify the size of both the memory and disc cache. Parts of the module (e.g. secondary cache, direct access to files) can be omitted if required, thus providing a level of customisation for the developer. The transparent nature of the module means that the API is small and simple: CDCache_Initialise (0x49940)This SWI allows the calling application to obtain some useful values back from the module, such as the features available in the loaded version of the module, and the addresses of the entry points (if direct access is available in that version). CDCache_SetCacheValues (0x49941)This SWI allows the application to specify the size of the primary cache (in Kbytes), the size of the secondary cache (in Kbytes) and the filename for the secondary cache file. CDCache_GetCacheValues (0x49942)This SWI allows the application to retrieve the current settings. CDCache_LockModule (0x49946)Because certain versions of CDCache export entry points into the code, this SWI needs to be called when an application utilising the module starts up. It prevents the module from being RMKilled. Note, though, that this SWI only has an effect if the version of the module loaded supports direct access. Modules without that support can be killed without detriment to any applications accessing CDFS-based files. CDCache_UnlockModule (0x49947)This SWI should be called when an application utilising the module exits, thus allowing the module to be RMKilled if there are no more applications using it. CDCache_FlushCache (0x49948)This SWI can be called when an application knows that it has finished with a particular disc and wants to remove any cached information about that disc. |
Copyright © PEP Associates 1998 |