2 using System.Collections.Generic;
3 using System.Reflection;
8 using OpenSim.Services.Interfaces;
10 namespace OpenSim.Services.HypergridService
14 private const double CACHE_EXPIRATION_SECONDS = 120000.0;
20 private ExpiringCache<UUID, UserAccount> m_UUIDCache;
28 if (m_Singleton == null)
36 m_UUIDCache =
new ExpiringCache<UUID, UserAccount>();
37 m_UserAccountService = u;
43 m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS);
52 if (m_UUIDCache.TryGetValue(userID, out account))
64 UUID uuid = UUID.Zero;
65 UUID.TryParse(id, out uuid);
70 account = m_UserAccountService.GetUserAccount(UUID.Zero, uuid);
77 #region IUserAccountService
80 return GetUser(userID.ToString());
105 m_UUIDCache.Remove(userID);
List< UserAccount > GetUserAccounts(UUID scopeID, string query)
Returns the list of avatars that matches both the search criterion and the scope ID passed ...
List< UserAccount > GetUserAccountsWhere(UUID scopeID, string query)
UserAccount GetUser(string id)
void Cache(UUID userID, UserAccount account)
static UserAccountCache CreateUserAccountCache(IUserAccountService u)
UserAccount GetUserAccount(UUID scopeID, UUID userID)
UserAccount GetUserAccount(UUID scopeID, string Email)
void InvalidateCache(UUID userID)
UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName)
UserAccount Get(UUID userID, out bool inCache)
bool StoreUserAccount(UserAccount data)
Store the data given, wich replaces the stored data, therefore must be complete.