Adds selected memoization
Page load times in tuskar-ui are too slow. This patch adds some caching to the tuskarclient and its list function to reduce page load time. Tests locally showed these changes decreased page load time by half in a virt environment. Change-Id: Ib5d67dc2c1a58011739b81156fa50f5cccb223d4
This commit is contained in:
parent
9f7d333d2c
commit
202329f64e
|
@ -39,6 +39,7 @@ KEYSTONE_CERTIFICATE_PARAMS = (
|
|||
'KeystoneSigningKey')
|
||||
|
||||
|
||||
@memoized.memoized
|
||||
def tuskarclient(request, password=None):
|
||||
api_version = "2"
|
||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||
|
@ -152,6 +153,7 @@ class Plan(base.APIResourceWrapper):
|
|||
return cls(plan, request=request)
|
||||
|
||||
@classmethod
|
||||
@memoized.memoized
|
||||
def list(cls, request):
|
||||
"""Return a list of Plans in Tuskar
|
||||
|
||||
|
|
Loading…
Reference in New Issue