Jihoon Cho
Jul 26, 2017 · 1 min read

타임아웃있는 @Cacheable 어노케이션을 유저별로 주어봄. 스프링 어노케이션은 정말 신세계같은데, @Cacheable 하고 @Async 어노테이션이 특히 쿨한거 같음. 그나저나 캐시가 유저별로 다 생성되니까 쫌… 모 내부용 사이트라서 메모리릭까지는 안날거같은데, 타임아웃 시간전에 리프래시를 하고 싶을때가 생길거같아 걱정이다. 직접 캐시 리프래시 구현할땐 모든 서버에 브로드캐스트 같은걸 날려서 전 서버 특정 캐시 비우기같은걸 했었는데 모든 서버 정보를 서버 시작시 디비에 넣고 어쩌구 하는 구현이 참 Cool 하지 못해서 다시 하고싶진 않다. 다만 브로드캐스트에 주키퍼를 이용할수있다면 주키퍼 공부 차원에서 함 구현시험은 해보고 싶다.

    Jihoon Cho

    Written by

    메모용 미디엄

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade