To increase response time under heavy load, a least recently used (LRU) file cache is used in the middle tier server. The active class FileCacheCleanupService coordinates LRU file cache mechanism by using external Perl scripts for the cache eviction etc. To assure proper concurrent operation, during image series retrieval from SRB and DICOM to AFNI conversion, exclusive file locks are used. To avoid race conditions during data streaming and cache cleanup, a read/write lock mechanism is simulated with file locks. The cache eviction is based both on file age and size.