An opportunistic directory cache and method of usage reduce the number of
calls between a client and server for file information, reducing the
wastage of network resources and server resources. The expirable
directory cache can be refreshed any time an appropriate directory
enumeration call is made to the server, and is capable of being partially
rather than completely invalidated in response to an indication that the
file information of a file listed in the cache has or will change. If the
affected file is identifiable, the entry in the cache for that file is
invalidated, i.e. it is no longer useful for serving file information. If
the affected file is not identifiable, then a first character projection
of the file name is invalidated in the cache. In this manner, the
directory cache is maintained with minimum resources and is persisted to
the greatest extent possible, increasing its likelihood of usefulness.