Type caching in Cloud Storage FUSE Stay organized with collections Save and categorize content based on your preferences.
This document provides details on type caching, which accelerates file ordirectory existence checks for workloads that perform many existence checksor path lookups. Type caching improves latency by reducing the number ofrequests made to Cloud Storage to check if a path exists.
Benefits of type caching
Improved performance for metadata operations: type caching storescached type information about whether an object is a file or directory, orsymbolic link locally, speeding up operations that need to determine anobject's type or check for its existence.
Reduced latency: type caching helps Cloud Storage FUSE avoid making requeststo Cloud Storage to fetch metadata, reducing the time it takes toperform
stat,ls, and path lookup operations.Fewer Cloud Storage requests: because the type information is servedfrom the local cache, the number of API calls to Cloud Storage isreduced.
Configure type caching
The type cache is enabled by default. Configure it by using thegcsfusecommand. To set the maximum size of the cache, provide a value for one of thefollowing:
gcsfuseoption:--type-cache-max-size-mb- Configuration file field:
metadata-cache:type-cache-max-size-mb
To set the TTL of the cache, use one of the following:
gcsfuseoption:--metadata-cache-ttl-secs- Configuration file field:
metadata-cache:ttl-secs
-1 to let the type cache use as muchmemory as needed.To learn more about type caching,seeCloud Storage FUSE semantics in the Cloud Storage FUSE GitHub documentation.
What's next
Read more abouthow to improve Cloud Storage FUSE performance.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.