---
title: vfs_setauthcache_ttl
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.5+]
path: kernel/1523286-vfs_setauthcache_ttl
---

# vfs_setauthcache_ttl

Enable credential caching and set time-to-live of cached authorized credentials for files in this filesystem.

## Declaration

```occ
void vfs_setauthcache_ttl(mount_t mp, int ttl);
```

## Parameters

- `mp`: Mount for which to set cache lifetime.

## Return Value

Return Value void.

## Discussion

Discussion If a filesystem is set to allow caching credentials, the VFS layer can authorize previously-authorized actions from the same vfs_context_t without calling down to the filesystem (though it will not deny based on the cache).
