{"repo":"dfed/CacheAdvance","free":true,"listed":false,"github":"https://github.com/dfed/CacheAdvance","clone":"git clone https://github.com/dfed/CacheAdvance.git","description":"A performant cache for logging systems. CacheAdvance persists log events 30x faster than SQLite.","language":"Swift","stars":51,"topics":["swift","logging","cache","ios","macos","watchos","tvos"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"CacheAdvance A performant cache for logging systems. CacheAdvance persists log events 30x faster than SQLite. Usage Basic Initialization To begin caching messages, you need to create a CacheAdvance instance with: A file URL – this URL must represent a file that has already been created. You can create a file by using FileManager 's createFile(atPath:contents:attributes:) API. A maximum number of bytes on disk the cache can consume. Whether the cache should overwrite old messages. If you need to preserve every message, set this value to false . If you care only about preserving recent messages, set this value to true . Appending messages to disk By the time the above method exits, the message will have been persisted to disk. A CacheAdvance keeps no in-memory buffer. Appending a new message is cheap, as a CacheAdvance needs to encode and persist only the new message and associated metadata. A CacheAdvance instance that does not overwrite old messages will throw a CacheAdvanceError.messageLargerThanRemainingCacheSize if appending a message would exceed the cache's maximumBytes . A CacheAdvance instance that does overwrite old messages will throw a CacheAdvanceError.messageLargerThanCacheCapacity if the message would require more than maximumBytes to store even after evicting all older messages from the cache. To ensure that caches can be read from 32bit devices, messages should not be larger than 2GB in size. Retrieving messages from disk This method reads all cached messages f","default_branch":null,"files":null,"tree":[],"storefront":"/r/dfed","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dfed/CacheAdvance/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}