Cache checker

Hi

Is there a way to check if a cache has received data in?

I have a protocol that parses a file and save the data in a cache. If there's no file, obviously the cache reader has nothing to read and an error is thrown. I've worked around that by creating a flag global just before the cache writer and then applying a filter on this global just before the cache reader but I was wondering if there was a more elegant solution?

Thank you