add-to-cache functionality