# cache

Source: https://ref.dm-lang.org/DM/cache

Files specified in single quotes are loaded (at compile time) into the world cache file (ending in `.rsc`). These are referred to as resource files. At runtime these files are downloaded by players into their `byond.rsc` file for future use. With the appropriate verbs or through savefiles, players may also upload files into the world cache.

If a resource file is not used for a long time, it will be automatically removed from the cache file to save space. If a cache file gets too bulky, however, you may manually delete it and start from scratch.

To make compilation faster and to make it easier to distribute code, the compiler will use an existing cache file if possible. That means you could compile up a world, and send people the `.dm` and `.rsc` files without any need to package all the individual resource files. It is also possible to include additional supplementary `.rsc` files by using the `#include` statement.

### See also
- [FILE_DIR definition](https://ref.dm-lang.org/DM/preprocessor/define/FILE_DIR.md)
- [cache_lifespan var (world)](https://ref.dm-lang.org/world/var/cache_lifespan.md)
- [fcopy_rsc proc](https://ref.dm-lang.org/proc/fcopy_rsc.md)
- [file proc](https://ref.dm-lang.org/proc/file.md)
- [icons](https://ref.dm-lang.org/DM/icon/index.md)
- [sounds](https://ref.dm-lang.org/DM/sound.md)
