code cleanup
add expireIn and cacheLimit support