Use v9 ormcache.
parent
39131a377b
commit
e87a64fa79
|
@ -116,7 +116,7 @@ class Image(models.Model):
|
||||||
return self._get_image_from_url_cached(self.url)
|
return self._get_image_from_url_cached(self.url)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
@tools.ormcache(skiparg=1)
|
@tools.ormcache("url")
|
||||||
def _get_image_from_url_cached(self, url):
|
def _get_image_from_url_cached(self, url):
|
||||||
"""Allow to download an image and cache it by its URL."""
|
"""Allow to download an image and cache it by its URL."""
|
||||||
if url:
|
if url:
|
||||||
|
|
Loading…
Reference in New Issue