Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Cache category restriction result
Browse files Browse the repository at this point in the history
Refs #1885
  • Loading branch information
M66B committed Aug 16, 2014
1 parent 745dc48 commit fc4b713
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/biz/bokhorst/xprivacy/PrivacyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,12 @@ else if (hook.getFrom() != null) {
}

// Update cache
CRestriction ckey = new CRestriction(cresult, null);
synchronized (mRestrictionCache) {
if (mRestrictionCache.containsKey(ckey))
mRestrictionCache.remove(ckey);
mRestrictionCache.put(ckey, ckey);
}
CRestriction ukey = new CRestriction(mresult, restriction.extra);
synchronized (mRestrictionCache) {
if (mRestrictionCache.containsKey(ukey))
Expand Down

0 comments on commit fc4b713

Please sign in to comment.