It is not a separate cache maintained by this script. It is the normal disk buffer cache keeping the most recently accessed blocks of data in memory.
The cache_dirs script simply does the equivalent of you requesting a directory listing (but very frequently), forcing the access of the data blocks representing the directory entries. Since it does this frequently, they never end up as the least recently accessed blocks and do not get reused once they've been read the first time from the physical disks. This minimizes the need to spin up a physical disk, so access is fast.
I am confused... I thought the purpose of this was the cache the directory listing so that when I request my movie list the drives wouldn't take time or have to spin up? Is this not the case? If it is then when I add a new movie when is the directory listing which I believe is cached at this point updated?