2024-04-10 07:43:38 +01:00
|
|
|
package cc.fascinated.model.cache;
|
|
|
|
|
|
|
|
import lombok.*;
|
|
|
|
import org.springframework.data.annotation.Id;
|
|
|
|
import org.springframework.data.redis.core.RedisHash;
|
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Braydon
|
|
|
|
*/
|
|
|
|
@AllArgsConstructor
|
|
|
|
@Getter
|
|
|
|
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
|
|
|
|
@ToString
|
2024-04-13 14:06:48 +01:00
|
|
|
@RedisHash(value = "playerName", timeToLive = 60L * 60L * 6) // 6 hours (in seconds)
|
2024-04-10 07:43:38 +01:00
|
|
|
public final class CachedPlayerName {
|
|
|
|
/**
|
|
|
|
* The username of the player.
|
|
|
|
*/
|
|
|
|
@Id @NonNull private String username;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The unique id of the player.
|
|
|
|
*/
|
|
|
|
@NonNull private UUID uniqueId;
|
|
|
|
}
|