'Save ``data`` to cache under ``name``.
If ``data`` is ``None``, the corresponding cache file will be
deleted.
:param name: name of datastore
:param data: data to store. This may be any object supported by
the cache serializer'

def cache_data(self, name, data):

    serializer = manager.serializer(self.cache_serializer)
    cache_path = self.cachefile((u'%s.%s' % (name, self.cache_serializer)))
    if (data is None):
        if os.path.exists(cache_path):
            os.unlink(cache_path)
            self.logger.debug(u'Deleted    cache    file    :    %s', cache_path)
        return
    with atomic_writer(cache_path, u'wb') as file_obj:
        serializer.dump(data, file_obj)
    self.logger.debug(u'Cached    data    saved    at    :    %s', cache_path)
