AssetCache
From OpenSimulator
(Created page with "=Introduction= OpenSimulator has an asset cache that stores the assets retrieved from an asset service. This reduces the load on a possibly remote asset service and improves Ope...") |
(→TODO) |
||
Line 16: | Line 16: | ||
==TODO== | ==TODO== | ||
* At the moment, the amount of memory or filesystem storage used by the cache can only be limited via manual actions (wiping all or part of cached assets from the filesystem), by console commands (e.g. "fcache clear") or by timeout settings (e.g. FileCacheTimeout = 24 to automatically remove cache files not access for 24 hours). There should be an option to limit filesystem/memory usage by storage space (e.g. limit cache to 2GB). | * At the moment, the amount of memory or filesystem storage used by the cache can only be limited via manual actions (wiping all or part of cached assets from the filesystem), by console commands (e.g. "fcache clear") or by timeout settings (e.g. FileCacheTimeout = 24 to automatically remove cache files not access for 24 hours). There should be an option to limit filesystem/memory usage by storage space (e.g. limit cache to 2GB). | ||
− | |||
− |
Revision as of 14:28, 18 March 2013
Contents |
Introduction
OpenSimulator has an asset cache that stores the assets retrieved from an asset service. This reduces the load on a possibly remote asset service and improves OpenSimulator responsiveness.
At the moment, there are technically four asset caches in OpenSimulator; Flotsam, Cenome, Core and GlynnTucker. However, Flotsam is both the default cache and the only one that gets development attention. The others may be removed in the future if this situation does not change.
General principles
- When OpenSimulator requires an asset (e.g. in response to a viewer request for a notecard), then it first asks the cache for this data. If the data is not found in the cache, then it asks the grid asset service (or possibly a foreign asset service in the case of Hypergrid). If the asset is found then it is both stored in the cache and returned to the user.
- If an asset is uploaded to OpenSimulator (e.g. by the viewer uploading an animation), then the asset is immediately both kept in cache (if there is room and the asset is not temporary) and sent to the asset service (if the asset is not temporary).
- Therefore, at any point you can wipe any temporary data stored by the asset cache (e.g. on the filesystem), since the next request for that asset will simply query the asset service as the asset will not be found in cache.
Flotsam asset cache
The flotsam asset cache, as mentioned above, is the default one in OpenSimulator and the one recommended for use. It can store assets on disk and/or in memory. By default, assets are only stored on disk and this is the recommended setting.
Flotsam is configured via the bin/config/FlotsamCache.ini file. Copy this file from FlotsamCache.ini.example and adjust if you want to change the cache settings. See FlotsamCache.ini.example for more information on the various settings.
TODO
- At the moment, the amount of memory or filesystem storage used by the cache can only be limited via manual actions (wiping all or part of cached assets from the filesystem), by console commands (e.g. "fcache clear") or by timeout settings (e.g. FileCacheTimeout = 24 to automatically remove cache files not access for 24 hours). There should be an option to limit filesystem/memory usage by storage space (e.g. limit cache to 2GB).