{"id":15130644,"url":"https://github.com/jakewharton/disklrucache","last_synced_at":"2025-09-28T20:31:48.220Z","repository":{"id":2160968,"uuid":"3106696","full_name":"JakeWharton/DiskLruCache","owner":"JakeWharton","description":"Java implementation of a Disk-based LRU cache which specifically targets Android compatibility.","archived":true,"fork":false,"pushed_at":"2020-03-02T13:54:37.000Z","size":416,"stargazers_count":5791,"open_issues_count":23,"forks_count":1176,"subscribers_count":262,"default_branch":"master","last_synced_at":"2024-11-17T12:53:23.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jakewharton.github.io/DiskLruCache","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakeWharton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-05T00:36:34.000Z","updated_at":"2024-11-15T22:55:45.000Z","dependencies_parsed_at":"2022-07-14T08:09:00.583Z","dependency_job_id":null,"html_url":"https://github.com/JakeWharton/DiskLruCache","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FDiskLruCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FDiskLruCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FDiskLruCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FDiskLruCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeWharton","download_url":"https://codeload.github.com/JakeWharton/DiskLruCache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234563121,"owners_count":18853055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-26T03:03:09.971Z","updated_at":"2025-09-28T20:31:47.928Z","avatar_url":"https://github.com/JakeWharton.png","language":"Java","readme":"Disk LRU Cache\n==============\n\nA cache that uses a bounded amount of space on a filesystem. Each cache entry\nhas a string key and a fixed number of values. Each key must match the regex\n`[a-z0-9_-]{1,120}`.  Values are byte sequences, accessible as streams or files.\nEach value must be between `0` and `Integer.MAX_VALUE` bytes in length.\n\nThe cache stores its data in a directory on the filesystem. This directory must\nbe exclusive to the cache; the cache may delete or overwrite files from its\ndirectory. It is an error for multiple processes to use the same cache\ndirectory at the same time.\n\nThis cache limits the number of bytes that it will store on the filesystem.\nWhen the number of stored bytes exceeds the limit, the cache will remove\nentries in the background until the limit is satisfied. The limit is not\nstrict: the cache may temporarily exceed it while waiting for files to be\ndeleted. The limit does not include filesystem overhead or the cache journal so\nspace-sensitive applications should set a conservative limit.\n\nClients call `edit` to create or update the values of an entry. An entry may\nhave only one editor at one time; if a value is not available to be edited then\n`edit` will return null.\n\n *  When an entry is being **created** it is necessary to supply a full set of\n    values; the empty value should be used as a placeholder if necessary.\n *  When an entry is being **edited**, it is not necessary to supply data for\n    every value; values default to their previous value.\n\nEvery `edit` call must be matched by a call to `Editor.commit` or\n`Editor.abort`. Committing is atomic: a read observes the full set of values as\nthey were before or after the commit, but never a mix of values.\n\nClients call `get` to read a snapshot of an entry. The read will observe the\nvalue at the time that `get` was called. Updates and removals after the call do\nnot impact ongoing reads.\n\nThis class is tolerant of some I/O errors. If files are missing from the\nfilesystem, the corresponding entries will be dropped from the cache. If an\nerror occurs while writing a cache value, the edit will fail silently. Callers\nshould handle other problems by catching `IOException` and responding\nappropriately.\n\n*Note: This implementation specifically targets Android compatibility.*\n\n\n\nDownload\n========\n\nDownload [the latest .jar][jar] or grab via Maven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.jakewharton\u003c/groupId\u003e\n  \u003cartifactId\u003edisklrucache\u003c/artifactId\u003e\n  \u003cversion\u003e2.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\nor Gradle:\n```groovy\ncompile 'com.jakewharton:disklrucache:2.0.2'\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository][snap].\n\nIf you would like to compile your own version, the library can be built by\nrunning `mvn clean verify`. The output JAR will be in the `target/` directory.\n*(Note: this requires Maven be installed)*\n\n\n\nLicense\n=======\n\n    Copyright 2012 Jake Wharton\n    Copyright 2011 The Android Open Source Project\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n [jar]: https://search.maven.org/remote_content?g=com.jakewharton\u0026a=disklrucache\u0026v=LATEST\n [snap]: https://oss.sonatype.org/content/repositories/snapshots/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakewharton%2Fdisklrucache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakewharton%2Fdisklrucache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakewharton%2Fdisklrucache/lists"}