Simple in-memory sliding cache with auto-refresh in javascript.