简体   繁体   English

关闭fabricjs图像对象的缓存

[英]Turn Off Caching for fabricjs image object

I am trying to load an image using fabricjs using the function: fabric.Image.fromURL() 我正在尝试使用fabricjs使用以下函数加载图像:fabric.Image.fromURL()

I want to turn off caching because when the image is updated, the fabricjs image object doesn't get updated because it gets cached. 我想关闭缓存,因为当图像更新时,fabricjs图像对象不会更新,因为它被缓存。

I cannot use a random string as a dummy parameter in the url to stop caching because the url I am using contains a signature parameter and therefore if I try to add a dummy parameter I need to update the signature parameter of the url which is something I don't want to do. 我不能在url中使用随机字符串作为虚拟参数来停止缓存,因为我使用的url包含签名参数,因此如果我尝试添加虚拟参数,我需要更新url的签名参数,这是我的事情不想做。

I would appreciate any help. 我将不胜感激任何帮助。 Thanks for your time! 谢谢你的时间!

Since version 1.7.0 fabricjs is not caching Images. 从版本1.7.0 fabricjs不缓存图像。 This is from documentation. 这是来自文档。

objectCaching :Boolean When true , object is cached on an additional canvas. objectCaching:Boolean如果为true ,则将对象缓存在其他画布上。 default to false for images since 1.7.0 从1.7.0开始,默认为false

Please check fabricjs image documentation 请检查fabricjs图像文档

I know it is too late, but maybe somebody can update their library to newer one. 我知道为时已晚,但也许有人可以将他们的库更新为新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM