private synchronized void cleanup() {
        if (lastCleanupTime != null) {
            // Delete anything that hasn't been accessed since we were last asked to cleanup.
            currentFiles.values().forEach(resourceItem -> {
                try {
                    if (resourceItem.getLastAccessTime().isBefore(lastCleanupTime)) {
                        deleteTempFile(resourceItem.getResourceKey());
                    }
                } catch (final RuntimeException e) {
                    LOGGER.error(e::getMessage, e);
                }
            });
        }
        lastCleanupTime = Instant.now();
    }
Delete files that haven't been accessed since the last cleanup.
This allows us to choose the cleanup frequency.
stroom-resource/stroom-resource-impl/src/main/java/stroom/resource/impl/ResourceStoreImpl.java