-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
For the many users of lage (and indirectly backfill) who don't use remote caching, it would be nice if the Azure cache implementation could be moved to a plugin instead of being included by default (due to the significant dependency+parsing bulk). Making this approach extensible would also open the opportunity for other remote cache backends.
Probably something like this:
interface CustomCacheStoragePlugin<TOptions> {
name: string;
getProvider: (logger: Logger, cwd: string, options: TOptions) => ICacheStorage;
}
interface CustomCacheStorageConfig<TOptions = unknown> {
provider: "custom";
// Can be either a path or a package name.
// If a package name, it's resolved from the location of the config file.
// (Maybe come up with a better prop name...?)
plugin: string;
options: TOptions;
}
// REMOVED: AzureBlobCacheStorageConfig (now a plugin)
type CacheStorageConfig =
| { provider: "local" }
| { provider: "local-skip" }
| NpmCacheStorageConfig
| CustomCacheStorageConfig;
// lage.config.js
const lageConfig = {
cacheOptions: {
cacheStorageConfig: {
provider: "custom",
plugin: "@lage-run/azure-blob-cache-storage",
options: { /*...*/ }
}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels