Fork me on GitHub

is it intentional that clojure.core.cache/ttl-cache-factory returns an object with no ttl data attached to it? this seems absurd


I'm hoping I'm just using it wrong (binding [*print-meta* true] (prn (clj-cache/ttl-cache-factory {}))) => {} - where's the TTL?


(binding [*print-meta* true] (prn (clj-cache/ttl-cache-factory {} :ttl 30000))) => {}


@noisesmith Check the type -- it's a TTLCache object.

Alex Miller (Clojure team)18:02:00

I’ve been looking for someone to help maintain core.cache btw. If you’re interested, let me know. :)

Alex Miller (Clojure team)18:02:13

ideally someone actually using it for stuff


seancorfield: oh! so weird, I didn't expect that, you are correct


(type (cache/ttl-cache-factory {} :ttl 3000))
=> clojure.core.cache.TTLCache


yeah, I just verified - the way it printed didn't make it obvious (I'm used to records and such with reader tags clearly)


We use core.cache pretty heavily so I could take it on I guess @alexmiller -- I don't expect it actually needs much "maintenance"?

Alex Miller (Clojure team)18:02:09

iirc there are a few tickets out there that could probably use some attention


it has open issues in jira

Alex Miller (Clojure team)18:02:34

I would be happy to have your help @seancorfield


19 open issues (and a still-open pull request)... fair enough...


And some pretty important ones open for three years... OK, sure. My wife's traveling a lot in March (China twice and Taiwan once, as well as an East Coast US trip) so I'll have plenty of alone time at weekends to work on it! Sign me up @alexmiller!


would it be worth making a patch for the cache types to have reader tags in their printed representation?


@noisesmith It would probably help folks trying to debug core.cache-using code.


(I guess I'll have to roll my sleeves up and take a look this weekend!)


I may be an outlier but it would also help my code - I normally use a database as the storage backend (instead of an in-memory atom or whatever), and encode / revive via the transit library. By accident my code happens to work even when I lose the custom cache types, but it would have broken if the db itself didn't enforce a ttl by deleting records.


Feel free to open a JIRA issue outlining what you'd like to see 🙂

Alex Miller (Clojure team)20:02:32

@seancorfield fair warning that core.memoize tends to be pretty tightly coupled to core.cache as a consumer and usage


Yup, and we use that heavily too.


Who is maintaining memoize these days?

Alex Miller (Clojure team)20:02:47

or rather, I look at it occasionally but don’t have time to really do anything good with it

Alex Miller (Clojure team)20:02:07

would love to have someone handling that too :)


Well, they go together so sign me up 🙂

Alex Miller (Clojure team)20:02:17

ok :) you won’t manage them any less than I am :)


Hah! An underwhelming vote of confidence! 🙂

Alex Miller (Clojure team)20:02:54

oh, I’m confident you’ll do great. just saying that I have set the bar low for you. :)

Alex Miller (Clojure team)20:02:50

I’ve switched over jira and the build box to make you owner. let me know if you need anything else (I think github is probably ok already?)


Thanks. Will ping you if I need anything else!