'Write id->thing dict to cache.
Used to populate the cache after a cache miss/db read. To ensure we
don\'t clobber a write by another process (we don\'t have a lock) we use
add_multi to only set the values that don\'t exist.'

@classmethod
def write_things_to_cache(cls, things_by_id):

    cache = cls._cache
    prefix = cls._cache_prefix()
    try:
        cache.add_multi(things_by_id, prefix=prefix, time=cls._cache_ttl)
    except MemcachedError as e:
        g.log.warning('write_things_to_cache    error:    %s', e)
