code: def create_cached_item(self, path, content):
          
          if isinstance(content, Image.Image):
              item_path = '%s/%s/%s' % (
                  current_app.static_folder,
                  self.cache_folder,
                  path.strip('/')
              )
              self.make_dirs(item_path)
  
              content.save(item_path)
  
              if os.path.isfile(item_path):
                  return '%s/%s/%s' % (current_app.static_url_path, self.cache_folder, path.strip('/'))
              else:  # pragma: no cover
                  LOGGER.warning('File is not created on path: %s' % item_path)
                  return False
          else:
              return False
docs: Create cached resource item
          :param path: str
          :param content: Image
          :return: str