Skip to content

Commit 76924c7

Browse files
author
Dogukan Erenel
committed
* Minor modification on DataCache
1 parent caa6490 commit 76924c7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Scripts/Utilities/DataCache.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ public void Save(string id, byte[] data)
134134
id = id.Replace('/', '_');
135135

136136
if (m_Cache.ContainsKey(id))
137+
{
138+
Log.Debug("DataCache", "Has same key in the cache. Flushing old one: {0}", id);
137139
Flush(id);
140+
}
138141

139142
CacheItem item = new CacheItem();
140143
item.Path = m_CachePath + id + ".bytes";
@@ -205,8 +208,10 @@ public void FlushOldest()
205208
oldest = kp.Value;
206209
}
207210

208-
if ( oldest != null )
209-
Flush( oldest.Id );
211+
if (oldest != null)
212+
{
213+
Flush(oldest.Id);
214+
}
210215
}
211216

212217
/// <summary>

0 commit comments

Comments
 (0)