Change in vdsm[master]: cache: Add caching decorator with invalidation

fromani at redhat.com fromani at redhat.com
Mon Nov 3 08:06:23 UTC 2014


Francesco Romani has posted comments on this change.

Change subject: cache: Add caching decorator with invalidation
......................................................................


Patch Set 2: Code-Review+1

(1 comment)

Nice! Added a minor comment for a possible improvement.

http://gerrit.ovirt.org/#/c/34709/2/lib/vdsm/cache.py
File lib/vdsm/cache.py:

Line 22: import os
Line 23: import functools
Line 24: 
Line 25: 
Line 26: def memoized(update=None):
The API is really nice, but I find this 'update' a too generic name.
What about 'update_on' (as Saggi suggested) or 'update_if'?
Line 27:     """
Line 28:     Return a caching decorator supporting invalidation.
Line 29: 
Line 30:     The decorator accepts an optional "update" callable, called each time the


-- 
To view, visit http://gerrit.ovirt.org/34709
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6dd8fb29d94286e3e3a3e29b8218501cbdc5c018
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list