CacheStore: Add convenient method getProjectCacheKey
@c454d4ef48a1ac18dc1024688773c5544865a3e8
--- app/utils/CacheStore.java
+++ app/utils/CacheStore.java
... | ... | @@ -8,6 +8,8 @@ |
8 | 8 |
import java.util.Map; |
9 | 9 |
import java.util.concurrent.ConcurrentHashMap; |
10 | 10 |
|
11 |
+import static utils.HttpUtil.decodeUrlString; |
|
12 |
+ |
|
11 | 13 |
/** |
12 | 14 |
* CacheStore |
13 | 15 |
*/ |
... | ... | @@ -30,6 +32,10 @@ |
30 | 32 |
.build(); |
31 | 33 |
|
32 | 34 |
|
35 |
+ public static String getProjectCacheKey(String loginId, String projectName) { |
|
36 |
+ return decodeUrlString(loginId) + ":" + decodeUrlString(projectName); |
|
37 |
+ } |
|
38 |
+ |
|
33 | 39 |
public static void refreshProjectMap(){ |
34 | 40 |
for (Map.Entry<String, Long> entry: projectMap.entrySet()) { |
35 | 41 |
String[] keys = entry.getKey().split(":"); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?