- /* synchronize on itself. */
- private final WritableCache<OwnIdentity, Trust> trustCache = new MemoryCache<OwnIdentity, Trust>(new ValueRetriever<OwnIdentity, Trust>() {
-
- @Override
- @SuppressWarnings("synthetic-access")
- public CacheItem<Trust> retrieve(OwnIdentity ownIdentity) throws CacheException {
- try {
- return new DefaultCacheItem<Trust>(webOfTrustConnector.getTrust(ownIdentity, DefaultIdentity.this));
- } catch (PluginException pe1) {
- throw new CacheException("Could not retrieve trust for OwnIdentity: " + ownIdentity, pe1);
- }
- }
-
- }, new TimedMap<OwnIdentity, CacheItem<Trust>>(60 * 60 * 1000));
+ private final Map<OwnIdentity, Trust> trustCache = Collections.synchronizedMap(new HashMap<OwnIdentity, Trust>());