improve data-cache invalidation

The further improves the previous commit by only even communication with the
cache, if the data has not been retrieved from the cache. The 'add' instead of
'set' is still used to make sure that concurrent WSGI workers who are accessing
a distributed cache, e.g. memcached, don't interfer with each other.