add skin part caching
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m24s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m24s
This commit is contained in:
22
src/main/java/cc.fascinated/model/cache/CachedPlayerSkinPart.java
vendored
Normal file
22
src/main/java/cc.fascinated/model/cache/CachedPlayerSkinPart.java
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
package cc.fascinated.model.cache;
|
||||
|
||||
import lombok.*;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.redis.core.RedisHash;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
@RedisHash(value = "player", timeToLive = 60L * 60L) // 1 hour (in seconds)
|
||||
public class CachedPlayerSkinPart {
|
||||
|
||||
/**
|
||||
* The ID of the skin part
|
||||
*/
|
||||
@Id @NonNull private String id;
|
||||
|
||||
/**
|
||||
* The skin part bytes
|
||||
*/
|
||||
private byte[] bytes;
|
||||
}
|
Reference in New Issue
Block a user