add server preview renderer
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 38s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 38s
This commit is contained in:
21
src/main/java/xyz/mcutils/backend/model/cache/CachedServerPreview.java
vendored
Normal file
21
src/main/java/xyz/mcutils/backend/model/cache/CachedServerPreview.java
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
package xyz.mcutils.backend.model.cache;
|
||||
|
||||
import lombok.*;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.redis.core.RedisHash;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Setter @Getter @EqualsAndHashCode
|
||||
@RedisHash(value = "serverPreview", timeToLive = 60L * 5) // 5 minutes (in seconds)
|
||||
public class CachedServerPreview {
|
||||
|
||||
/**
|
||||
* The ID of the server preview
|
||||
*/
|
||||
@Id @NonNull private String id;
|
||||
|
||||
/**
|
||||
* The server preview bytes
|
||||
*/
|
||||
private byte[] bytes;
|
||||
}
|
Reference in New Issue
Block a user