pseudo code for diskcache