Skip to content

Instantly share code, notes, and snippets.

View karian7's full-sized avatar
🎯
Focusing

koasu karian7

🎯
Focusing
View GitHub Profile
/**
* 알림 리스트 조회
*
* @param userno
* @param minidx
* @return minidx 이후의 알림 리스트
*/
public List<Alim> getAlims(long userno, long minidx) {
// 키 조합
package net.daum.mystory.core.cache.abst;
import javax.annotation.PostConstruct;
import net.daum.cafe.newsfeed.store.impl.jedis.JedisSupport;
import net.daum.mystory.core.cache.config.ProtostuffSerializer;
import net.daum.mystory.core.domain.type.RedisHostType;
public abstract class AbstractRedisCache<T> extends JedisSupport {
@karian7
karian7 / redis-server
Last active December 16, 2015 13:48 — forked from tessro/redis-server
설정파일위치 변경. kill 시 pid로.
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
# gist: https://gist.github.com/karian7/5443832
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
private CafeMapInfo getCafeMapInfo(CafeMap map, String key) {
try {
return cache.get(key, new Callable<CafeMapInfo>() {
@Override
public CafeMapInfo call() {
try {
// 없다면 gmap 으로 부터 가져온다.
return map.get(key);
} catch (EntryNotFoundException e) {
private final Cache<String, CafeMapInfo> cache = CacheBuilder.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).build();
private CafeMapInfo getCafeMapInfo(final CafeMap map, final String key) {
try {
return cache.get(key, new Callable<CafeMapInfo>() {
@Override
public CafeMapInfo call() throws Exception {
try {
// 없다면 gmap 으로 부터 가져온다.
return map.get(key);