需要实现#cache!如果你想使用 Cloudinary::CarrierWave::Storage 作为缓存存储

Posted

技术标签:

【中文标题】需要实现#cache!如果你想使用 Cloudinary::CarrierWave::Storage 作为缓存存储【英文标题】:Need to implement #cache! if you want to use Cloudinary::CarrierWave::Storage as cache storage 【发布时间】:2020-05-05 15:05:54 【问题描述】:

。我在用 ruby​​ on rails 为我们的博客上传图片时遇到了这个问题。请告诉我我是如何解决此问题的。 Backbenchersstudy

【问题讨论】:

【参考方案1】:

Cloudinary 目前不缩进用作缓存存储。但是,作为 CarrierWave 2.0 更新 here 的一部分,行为发生了变化,因此默认缓存存储现在配置为与常规上传相同,因此出现错误。

您可以使用以下配置将缓存存储设置为文件,而不是尝试使用 Cloudinary。

CarrierWave.configure do |config|
  config.cache_storage = :file
end

相关话题: https://github.com/cloudinary/cloudinary_gem/issues/344

【讨论】:

以上是关于需要实现#cache!如果你想使用 Cloudinary::CarrierWave::Storage 作为缓存存储的主要内容,如果未能解决你的问题,请参考以下文章

PHP 标签cloudin'

如何安装WP Super Cache加速WordPress网站访问速度

Cache 工作原理,Cache 一致性,你想知道的都在这里

buffers与cached

springboot开启Cache缓存

oracle序列问题