add super lightweight simple cache function