diff options
author | Melanie Thielker | 2009-05-10 12:27:05 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-10 12:27:05 +0000 |
commit | d8e1842d2507b2c18b21671ed01496b3a2c59e18 (patch) | |
tree | 2ae57cf45dd1b22fe48b72b85c952258d87f60b6 /OpenSim/Region/CoreModules/Asset | |
parent | Fix the build break (diff) | |
download | opensim-SC-d8e1842d2507b2c18b21671ed01496b3a2c59e18.zip opensim-SC-d8e1842d2507b2c18b21671ed01496b3a2c59e18.tar.gz opensim-SC-d8e1842d2507b2c18b21671ed01496b3a2c59e18.tar.bz2 opensim-SC-d8e1842d2507b2c18b21671ed01496b3a2c59e18.tar.xz |
Add some asset cache plumbing. Change the generic cache from UUID to string
keys to allow caching the new crop of URI identified objects.
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index 957b04f..c4cc007 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | |||
@@ -45,8 +45,6 @@ namespace OpenSim.Region.CoreModules.Asset | |||
45 | MethodBase.GetCurrentMethod().DeclaringType); | 45 | MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private bool m_Enabled = false; | 47 | private bool m_Enabled = false; |
48 | private Dictionary<Scene, IAssetService> m_AssetService = | ||
49 | new Dictionary<Scene, IAssetService>(); | ||
50 | 48 | ||
51 | public string Name | 49 | public string Name |
52 | { | 50 | { |
@@ -85,10 +83,6 @@ namespace OpenSim.Region.CoreModules.Asset | |||
85 | 83 | ||
86 | public void AddRegion(Scene scene) | 84 | public void AddRegion(Scene scene) |
87 | { | 85 | { |
88 | if (!m_Enabled) | ||
89 | return; | ||
90 | |||
91 | scene.RegisterModuleInterface<IImprovedAssetCache>(this); | ||
92 | } | 86 | } |
93 | 87 | ||
94 | public void RemoveRegion(Scene scene) | 88 | public void RemoveRegion(Scene scene) |
@@ -97,15 +91,27 @@ namespace OpenSim.Region.CoreModules.Asset | |||
97 | 91 | ||
98 | public void RegionLoaded(Scene scene) | 92 | public void RegionLoaded(Scene scene) |
99 | { | 93 | { |
100 | if (!m_Enabled) | 94 | } |
101 | return; | 95 | |
96 | //////////////////////////////////////////////////////////// | ||
97 | // IImprovedAssetCache | ||
98 | // | ||
99 | |||
100 | public void Cache(AssetBase asset) | ||
101 | { | ||
102 | } | ||
103 | |||
104 | public AssetBase Get(string id) | ||
105 | { | ||
106 | return null; | ||
107 | } | ||
102 | 108 | ||
103 | m_AssetService[scene] = | 109 | public void Expire(string id) |
104 | scene.RequestModuleInterface<IAssetService>(); | 110 | { |
111 | } | ||
105 | 112 | ||
106 | if (m_AssetService[scene] != null) | 113 | public void Clear() |
107 | m_log.InfoFormat("[ASSET CACHE]: Enabled for region {0}", | 114 | { |
108 | scene.RegionInfo.RegionName); | ||
109 | } | 115 | } |
110 | } | 116 | } |
111 | } | 117 | } |