Set expire time for cached values. Use cache for atom str as well

Signed-off-by: Pankaj Singh <psjinx@gmail.com>