We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cdb69f commit 1999b5aCopy full SHA for 1999b5a
Scripts/Utilities/DataCache.cs
@@ -129,6 +129,24 @@ public byte[] Find(string id)
129
return null;
130
}
131
132
+ public bool IsCached(string id)
133
+ {
134
+ bool isCached = false;
135
+
136
+ if(!string.IsNullOrEmpty(id))
137
138
+ id = id.Replace('/', '_');
139
140
+ CacheItem item = null;
141
+ if (m_Cache.TryGetValue(id, out item))
142
143
+ isCached = File.Exists(item.Path);
144
+ }
145
146
147
+ return isCached;
148
149
150
/// <summary>
151
/// Save data into the cache by ID.
152
/// </summary>
0 commit comments