Add some asset cache plumbing. Change the generic cache from UUID to string

keys to allow caching the new crop of URI identified objects.
This commit is contained in:
Melanie Thielker
2009-05-10 12:27:05 +00:00
parent 14a6880352
commit d8e1842d25
8 changed files with 106 additions and 46 deletions

View File

@@ -25,9 +25,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenSim.Framework;
namespace OpenSim.Region.Framework.Interfaces
{
public interface IImprovedAssetCache
{
void Cache(AssetBase asset);
AssetBase Get(string id);
void Expire(string id);
void Clear();
}
}

View File

@@ -2825,8 +2825,12 @@ namespace OpenSim.Region.Framework.Scenes
objectCapacity = objects;
}
public List<FriendListItem> GetFriendList(UUID avatarID)
public List<FriendListItem> GetFriendList(string id)
{
UUID avatarID;
if (!UUID.TryParse(id, out avatarID))
return new List<FriendListItem>();
return CommsManager.GetUserFriendList(avatarID);
}