nautobot-app-ssot icon indicating copy to clipboard operation
nautobot-app-ssot copied to clipboard

Evaluate providing some built-in ORM caching

Open Kircheneer opened this issue 1 year ago • 1 comments

Environment

  • Nautobot version: latest
  • nautobot-ssot version: latest

Proposed Functionality

Have the framework expose something like get_from_cache(content_type, **kwargs) with a cache scoped to the execution of a single job.

Use Case

Objects that are commonly looked up (e.g. Region, Status) could be looked up from the DB once in the beginning and then, for CRUD operations on models or during loading, just be looked up from memory, speeding up operations as a whole.

Kircheneer avatar May 23 '23 11:05 Kircheneer

Yes, this is very much needed as it is a pattern that is commonly implemented by developers today in ssot jobs.

lampwins avatar Jun 23 '23 20:06 lampwins