'Saves the value to cache with the name given.'

def _put_cache(self, name, value):

    if self.config.has_option('defaults', 'cache_dir'):
        cache_dir = os.path.expanduser(self.config.get('defaults', 'cache_dir'))
        if (not os.path.exists(cache_dir)):
            os.makedirs(cache_dir)
        cache_file = os.path.join(cache_dir, name)
        with open(cache_file, 'w') as cache:
            json.dump(value, cache)
