# Conditionally Naming Cache Keys

**URL:** <https://discuss.circleci.com/t/conditionally-naming-cache-keys/22902>\
**Category:** Build Environment\
**Tags:** config\
**Created:** [June 11, 2018, 3:55pm UTC](https://discuss.circleci.com/t/conditionally-naming-cache-keys/22902 "2018-06-11T15:55:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [August 8, 2018, 9:55am UTC](https://discuss.circleci.com/t/conditionally-naming-cache-keys/22902/3 "2018-08-08T09:55:22Z")

</div>

> [@grahamw](#):
>
> I’m not 100% sure if you can use any arbitrary environment variables or just the CircleCI built-in ones [for cache key names]

[See here](https://discuss.circleci.com/t/setting-environment-variable-from-script-command-for-later-use-in-cache-name/24036/2).

---

_[View the full topic](https://discuss.circleci.com/t/conditionally-naming-cache-keys/22902)._
