fixed redis cache leak issue
This commit is contained in:
8
server/.idea/modules.xml
generated
8
server/.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/private-server.iml" filepath="$PROJECT_DIR$/private-server.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Filename: IDecodeSessionRepositoryImpl.java
|
||||
@@ -38,6 +39,7 @@ public class DecodeSessionRepositoryImpl implements IDecodeSessionRepository {
|
||||
|
||||
public void add(final String decodeSessionId, Integer binaryId) {
|
||||
hashOperations.put(KEY, decodeSessionId, binaryId);
|
||||
redisTemplate.expire(decodeSessionId, 7 , TimeUnit.DAYS);
|
||||
}
|
||||
|
||||
public void delete(String decodeSessionId) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Repository;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Filename: IIRBinaryRepositoryImpl.java
|
||||
@@ -41,6 +42,7 @@ public class IRBinaryRepositoryImpl implements IIRBinaryRepository {
|
||||
|
||||
public void add(Integer id, RemoteIndex remoteIndex) {
|
||||
hashOperations.put(KEY, id, remoteIndex);
|
||||
redisTemplate.expire(Integer.toString(id), 7 , TimeUnit.DAYS);
|
||||
}
|
||||
|
||||
public void delete(final Integer id) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Filename: UserAppRepositoryImpl.java
|
||||
@@ -39,6 +40,7 @@ public class UserAppRepositoryImpl implements IUserAppRepository {
|
||||
|
||||
public void add(Integer id, String token) {
|
||||
hashOperations.put(KEY, token, id);
|
||||
redisTemplate.expire(token, 7 , TimeUnit.DAYS);
|
||||
}
|
||||
|
||||
public void delete(final String token) {
|
||||
|
||||
Reference in New Issue
Block a user