DMTF / Redfish-Service-Validator

The Redfish Service Validator is a Python3 tool for checking conformance of any "device" with a Redfish service interface against Redfish CSDL schema
Other
37 stars 33 forks source link

Improve callResourceUri caching #578

Open tomasg2012 opened 3 months ago

tomasg2012 commented 3 months ago

Current caching relies on python's built in lru_cache function. When URIs contain fragments (i.e. /redfish/v1/.../Thermal#/Fans/1), it will call the resource /redfish/v1/.../Thermal for each link in a Collection, when once would be satisfactory. Fix could use a wrapper that strips the fragment, then cache that URI.

Consider adding an option for cache size and how much memory it consumes while running the tool on big services.