nautobot / nautobot-app-ssot

Single Source of Truth for Nautobot
https://docs.nautobot.com/projects/ssot/en/latest/
Other
35 stars 33 forks source link

Evaluate providing some built-in ORM caching #121

Open Kircheneer opened 1 year ago

Kircheneer commented 1 year ago

Environment

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.

lampwins commented 1 year ago

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