-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INTERNAL: provide meaningful methods instead of setters in ArcusCacheConfiguration #101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ผ๋ถ ๋ฆฌ๋ทฐ
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Outdated
Show resolved
Hide resolved
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Show resolved
Hide resolved
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Show resolved
Hide resolved
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Show resolved
Hide resolved
README.md
Outdated
defaultCacheConfig.setExpireSeconds(60); | ||
defaultCacheConfig.setTimeoutMilliSeconds(800); | ||
return defaultCacheConfig; | ||
return ArcusCacheConfiguration.defaultConfig() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brido4125 @uhm0311
๊ธฐ์กด ๋ฐฉ์์์ ํ์ฌ ๋ฐฉ์์ผ๋ก ๋ณ๊ฒฝํ๋ ๊ฒ์ด ๊ด์ฐฎ์์ง ์๊ฒฌ ๋ถํ๋๋ฆฝ๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๋ ์ข๋ค๊ณ ์๊ฐ๋์ด์ ๋ฆฌ๋ทฐ ์งํํ์์ต๋๋ค.
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Outdated
Show resolved
Hide resolved
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Outdated
Show resolved
Hide resolved
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Outdated
Show resolved
Hide resolved
import org.springframework.util.Assert; | ||
|
||
@SuppressWarnings("DeprecatedIsStillUsed") | ||
public class ArcusCacheConfiguration implements InitializingBean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ธฐ์กด ์ฌ์ฉ์๊ฐ ArcusCacheConfiguration์ InitializingBean ํ์
์ผ๋ก ์ฌ์ฉํ ๋ก์ง์
๊ฑฐ์ ์๊ฒ ์ง๋ง ํ์
์ด ๋ณ๊ฒฝ๋๋ ๊ฑฐ๋ ๋ฆด๋ฆฌ์ฆ ํ ๋ ๋ณ๋์ ์๋ฆผ์ ํ์ํ ๊ฒ ๊ฐ์ต๋๋ค.
9601b53
to
2f17f09
Compare
์๋ ์ฝ๋์ ์๋ config ๊ฐ์ฒด ์์ฑ ๋ฐฉ์๋ ์ฐธ๊ณ ๋ฐ๋๋๋ค. public LocalCacheManager(String name, int max, int exptime, boolean copyOnRead,
boolean copyOnWrite) {
this.cache = CacheManager.getInstance().getCache(name);
if (cache == null) {
CacheConfiguration config =
new CacheConfiguration(name, max)
.copyOnRead(copyOnRead)
.copyOnWrite(copyOnWrite)
.memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.LRU)
.eternal(false)
.timeToLiveSeconds(exptime)
.timeToIdleSeconds(exptime)
.diskExpiryThreadIntervalSeconds(60)
.persistence(new PersistenceConfiguration().strategy(
PersistenceConfiguration.Strategy.NONE));
this.cache = new Cache(config, null, null);
CacheManager.getInstance().addCache(cache);
logger.info("Arcus k/v local cache is enabled : %s", cache.toString());
}
} |
src/main/java/com/navercorp/arcus/spring/cache/ArcusCacheConfiguration.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฆฌ๋ทฐ ์๋ฃ
1ec3aad
to
8ceb3c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฆฌ๋ทฐ ์๋ฃ
README.md
Outdated
- `withFrontExpireSeconds(int frontExpireSeconds)` | ||
- Set Front Cache TTL(TimeToLive). | ||
- `enableForcingFrontCache()`, `disableForcingFrontCache()` | ||
- Set whether to perform Front Cache regardless of success or failure of ARCUS request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์กฐํ ์์ฒญ์ด ์๋ set, .... ๋ฑ์ ๋ณ๊ฒฝ ์์ฒญ์ ๋ํ ์ค์ ์ด๋ฉฐ,
๋ณ๊ฒฝ ์์ฒญ์ด ์คํจํ๋๋ผ๋ Front cache์ set, ... ๋ฑ์ผ๋ก ์ ์ฅํด ๋ ๊ฒ์ธ์ง๋ฅผ ์ค์ ํ๋ ๊ฒ์
๋๋ค.
์ด๋ฌํ ๋ด์ฉ์ด ๋ช ํํ๊ฒ ๋๋ฌ๋๋ฉด ์ข๊ฒ ์ต๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฐ์ํ์ต๋๋ค.
๐ Related Issue
โจ๏ธ What I did