Por que Volley DiskBasedCache splicing sem acesso direto ao nome do arquivo em cache
/**
* Creates a pseudo-unique filename for the specified cache key.
*
* @param key The key to generate a file name for.
* @return A pseudo-unique filename.
*/
private String getFilenameForKey(String key) {
int firstHalfLength = key.length() / 2;
String localFilename = String.valueOf(key.substring(0, firstHalfLength).hashCode());
localFilename += String.valueOf(key.substring(firstHalfLength).hashCode());
return localFilename;
}
Este código do Google VolleyDiskBasedCache
.
Por que emendar sem acesso direto.
por exemplo:
return String.valueOf(key.hashCode());