From a71585a4503ec11d92cb4b1fec2d579e1cfcf704 Mon Sep 17 00:00:00 2001 From: Deepak Dahiya <59823596+t-dedah@users.noreply.github.com> Date: Tue, 29 Mar 2022 22:19:10 +0000 Subject: [PATCH] minor --- packages/cache/src/cache.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/cache/src/cache.ts b/packages/cache/src/cache.ts index 6847cf0d..687984ad 100644 --- a/packages/cache/src/cache.ts +++ b/packages/cache/src/cache.ts @@ -43,6 +43,16 @@ function checkKey(key: string): void { } } +/** + * isFeatureAvailable to check the presence of Actions cache service + * + * @returns boolean return true if Actions cache service feature is available, otherwise false + */ + + export function isFeatureAvailable(): boolean { + return !!process.env['ACTIONS_CACHE_URL'] +} + /** * Restores cache from keys *