Skip to content

Commit

Permalink
fix: interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
QwQ-dev committed Dec 21, 2024
1 parent 963bce2 commit 232851a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ The overall dependence is on the Fairy Framework framework. It probably doesn't
- annotation - Not fully completed (annotation processor available)
- configuration - Not fully completed (serialization/yaml/json/toml available)
- mongodb - Not fully completed
- cache - Not fully completed (Memory Caffeine cache available)
- cache - Not fully completed (memory/caffeine/redis cache available)
- data - Not started yet
- security - Not started yet
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.qwqdev.library.cache.service.redis;

import io.fairyproject.log.Log;
import lombok.Data;
import me.qwqdev.library.cache.model.ExpirationSettings;
import org.redisson.Redisson;
import org.redisson.api.RBucket;
Expand All @@ -20,7 +21,8 @@
* @author qwq-dev
* @since 2024-12-21 12:00
*/
public class RedisCacheService<K, V> {
@Data
public class RedisCacheService<K, V> implements RedisCacheServiceInterface<K, V> {
private final RedissonClient redissonClient;

/**
Expand All @@ -42,6 +44,7 @@ public RedisCacheService(Config config) {
* @param expirationSettings {@inheritDoc}
* @return
*/
@Override
public V get(K key, Function<RedissonClient, RBucket<V>> function, Supplier<V> query, boolean cacheAfterQuery, ExpirationSettings expirationSettings) {
return executeCacheOperation(function, key, query, cacheAfterQuery, expirationSettings);
}
Expand All @@ -56,6 +59,7 @@ public V get(K key, Function<RedissonClient, RBucket<V>> function, Supplier<V> q
* @param expirationSettings {@inheritDoc}
* @return {@inheritDoc}
*/
@Override
public V getWithLock(K key, Function<RedissonClient, RBucket<V>> function, Supplier<V> query, boolean cacheAfterQuery, ExpirationSettings expirationSettings) {
return executeCacheOperationWithLock(function, key, query, cacheAfterQuery, expirationSettings);
}
Expand Down

0 comments on commit 232851a

Please sign in to comment.