Commit Graph
35 Commits
Author SHA1 Message Date
Kovid Goyal dd0130180b Use the kitty fatal function 2021-05-06 11:19:06 +05:30
Kovid Goyal fc184984a0 ... 2021-04-27 15:11:34 +05:30
Kovid Goyal 2178ff1c48 DRYer 2021-04-27 15:07:27 +05:30
Kovid Goyal ae1df38c88 Fallback to mkostemp if O_TMPFILE fails 2021-04-27 12:03:24 +05:30
Kovid Goyal 7ec803222f Fix a mem leak of the disk cache directory path 2021-04-10 13:21:58 +05:30
Kovid Goyal 2a96d2621c Use cleanup in a few more places to simplify the code 2021-02-19 18:53:30 +05:30
Kovid Goyal 12604072fc Allow querying number cached in ram from c code as well 2021-02-19 09:28:56 +05:30
Kovid Goyal 0341b64748 Allow caching of disk cache entries in RAM 2021-02-18 10:22:42 +05:30
Kovid Goyal 726d736aac Type check return value of cache_dir 2021-02-05 10:34:17 +05:30
Kovid Goyal 0adbbc6d62 Implement loading of frame animation data 2021-01-31 20:58:41 +05:30
Kovid Goyal 5a182d3d13 Store image data in a disk cache 2021-01-31 20:58:41 +05:30
Kovid Goyal d55fde9eea Use EINTR safe wrappers for open() and shm_open() 2021-01-31 07:02:11 +05:30
Kovid Goyal 2762488c81 Remove double increment 2021-01-03 21:10:37 +05:30
Kovid Goyal 1b59a1c421 Finish tests of disk cache 2021-01-03 17:36:40 +05:30
Kovid Goyal df00e9545d Add some more ensure_state() 2021-01-03 12:13:08 +05:30
Kovid Goyal d1496f1eb5 Use O_TMPFILE when available 2021-01-03 07:07:50 +05:30
Kovid Goyal 14d9bcb08a Go back to nanosleep since it is in POSIX 2021-01-03 06:45:53 +05:30
Kovid Goyal c869774c58 More tests for the disk cache 2021-01-03 06:22:48 +05:30
Kovid Goyal 18679348b2 Use usleep rather than nanosleep 2021-01-03 05:00:40 +05:30
Kovid Goyal 8f58140419 Start work on tests for disk cache 2021-01-03 04:28:48 +05:30
Kovid Goyal bc86bc91f7 Auto-defrag cache file 2021-01-02 11:32:38 +05:30
Kovid Goyal 7f73609c77 Update total_size when removing cache items 2021-01-01 14:31:57 +05:30
Kovid Goyal 49562e96cc Python wrappers for the disk cache methods 2021-01-01 14:08:23 +05:30
Kovid Goyal 58b1868536 When cache is emptied clear disk file to avoid fragmentation 2021-01-01 13:15:21 +05:30
Kovid Goyal 1cad40e977 ... 2021-01-01 12:03:09 +05:30
Kovid Goyal 9fbf23fdcc Implement simple defrag for on-disk cache 2021-01-01 11:54:13 +05:30
Kovid Goyal 55e53db184 ... 2020-12-31 15:38:57 +05:30
Kovid Goyal f790e8bd47 DRYer 2020-12-31 15:33:04 +05:30
Kovid Goyal 54de2d177e Enforce max key size
Also allocate it dynamically
2020-12-31 15:30:55 +05:30
Kovid Goyal ec96771e4c track total size and since each cache has its own writer thread store current key per thread 2020-12-31 15:24:25 +05:30
Kovid Goyal 99d2647335 Code to write to cache file 2020-12-31 15:18:30 +05:30
Kovid Goyal c346cbc252 Use a single file for the disk cache
This has the advantage that on crash it is automatically cleaned
2020-12-31 13:54:33 +05:30
Kovid Goyal 3c77290c2c Code to get random bytes in C, cross-platform 2020-12-31 11:26:22 +05:30
Kovid Goyal fe1050fc0e More work on disk cache 2020-12-30 14:26:38 +05:30
Kovid Goyal 3162d391cc Start work on disk cache 2020-12-29 19:16:21 +05:30