https://dagster.io/ logo
#ask-community
Title
# ask-community
j

Jordan

02/08/2023, 4:37 PM
Hi! Is it possible to cache the repositories (and not the assets) so that you don't have to rebuild them at each run?
🤖 1
s

sean

02/08/2023, 4:42 PM
Hi Jordan, Could you elaborate a bit on what you mean by “rebuild repository”? A repository in Dagster is a python abstraction that holds a bunch of definitions.
j

Jordan

02/08/2023, 4:50 PM
Of course, I'm actually looking to reuse RepositoryDefinition objects so I don't have to re-read the entire code every time I run a job. You can find more context on what I'm trying to do in this previous conversation.
s

sean

02/08/2023, 6:10 PM
cc @owen since you have the context from previous discussion
o

owen

02/08/2023, 6:19 PM
hi @Jordan the quick answer is that no there is currently no way to cache anything about the repository other than the asset definitions. CacheableAssetsDefinitions can produce an arbitrary set of assets from their cacheable data, so you could get tricky with things if you wanted (i.e. bundle up the whole API response into a single cached AssetsDefinitionCacheableData for the repository, then unpack that object into many individual asset definitions), but I'm not sure how much this would help performance. I think the most promising route here would be to separate each of your repositories into a different code location