{"id":24011878,"url":"https://github.com/ninjakoala/ttlr","last_synced_at":"2026-06-17T11:31:20.690Z","repository":{"id":22876772,"uuid":"26224740","full_name":"ninjakoala/ttlr","owner":"ninjakoala","description":"Clojure TTL cache with background refresh","archived":false,"fork":false,"pushed_at":"2018-09-26T14:32:27.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-21T05:36:41.374Z","etag":null,"topics":["caching","clojure"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ninjakoala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-05T15:06:55.000Z","updated_at":"2020-12-21T09:06:36.000Z","dependencies_parsed_at":"2022-08-21T16:10:27.759Z","dependency_job_id":null,"html_url":"https://github.com/ninjakoala/ttlr","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ninjakoala/ttlr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjakoala%2Fttlr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjakoala%2Fttlr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjakoala%2Fttlr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjakoala%2Fttlr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninjakoala","download_url":"https://codeload.github.com/ninjakoala/ttlr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjakoala%2Fttlr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34447264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["caching","clojure"],"created_at":"2025-01-08T05:17:16.706Z","updated_at":"2026-06-17T11:31:20.675Z","avatar_url":"https://github.com/ninjakoala.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Clojars Project](https://img.shields.io/clojars/v/com.ninjakoala/ttlr.svg)](https://clojars.org/com.ninjakoala/ttlr) [![Build Status](https://travis-ci.org/ninjakoala/ttlr.svg?branch=master)](https://travis-ci.org/ninjakoala/ttlr)\n\n```clojure\n(ns yourapp\n  (:require [ninjakoala.ttlr :as ttlr]))\n\n(defn update-costly-thing\n  []\n  (Thread/sleep 10000)\n  {:some \"data\"})\n\n(ttlr/init :cpu-count 1)\n\n; Wait ten seconds after this next call (we're seeding the state with the result of (update-costly-thing))\n(ttlr/schedule :costly-thing update-costly-thing (* 60 1000) (update-costly-thing))\n\n; Now retrieve your costly thing quickly and it'll be updated in the background every minute.\n(ttlr/state :costly-thing)\n```\n\n# ttlr\n\nTTL with refresh. You `schedule` refreshes to take place and store things under a particular `:key-name`.\n\n## Why not memoize or core.cache?\n\nBecause we wanted a way to be able to retrieve things in the background rather than have a user take the penalty of retrieving the item when the cache expires.\n\n## License\n\nCopyright © 2014 Neil Prosser\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjakoala%2Fttlr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninjakoala%2Fttlr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjakoala%2Fttlr/lists"}