Patent ID: 8776158

Claim:
A computer-implemented method of operating a cache memory for forward playback and backward playback of video data to a host application from a video file in a storage array, the method comprising: fetching a first segment of data from the video file in the storage array and storing the first segment of data in the cache memory; fetching a second segment of data from the video file in the storage array and storing the second segment of data in the cache memory, the second segment of data being contiguous with and following the first segment of data in the video file; fetching a third segment of data from the video file in the storage array and storing the third segment of data in the cache memory, the third segment of data being contiguous with and preceding the first segment of data in the video file; after the fetching of the first, second, and third segments of data from the video file in the storage array and the storing of the first, second, and third segments of data in the cache memory, receiving from the host application a request for data from the video file beginning at a specified offset in the video file, and responding to the request for data by searching the cache memory for data from the video file at the specified offset in the video file and finding that the data from the video file at the specified offset is in the third segment of data in the cache memory, and in response to finding that the data from the video file at the specified offset is in the third segment of data in the cache memory, returning data from the third segment of data in the cache memory to the host application and fetching a fourth segment of data from the video file in the storage array and storing the fourth segment of data from the video file in the cache memory, the fourth segment of data being contiguous with and preceding the third segment of data in the video file; which includes performing a search of cache state information in response to an initial sequence of first and second read requests from the host application for reading data from the video file, and performing the fetching of the first, second, and third segments of data from the video file in the storage array in response to the search of the cache state information finding that the cache state information indicates that: (a) buffers have already been allocated in the cache memory for buffering the first, second, and third segments of the data from the video file, and (b) the buffers do not include the data requested by the second read request, and (c) the initial sequence of the first and second read requests is likely to be the beginning of a sequential access of the video file; and wherein further computing a distance between an offset specified by the first read request and an offset specified by the second read request and comparing the distance to a threshold and finding that the comparison indicates that the initial sequence of the first and second read requests is likely to be the beginning of a sequential access of the video file.