whitfin / cachex

A powerful caching library for Elixir with support for transactions, fallbacks and expirations
https://hexdocs.pm/cachex/
MIT License
1.6k stars 103 forks source link

Does `Cachex.fetch` accept `ttl` option? #307

Closed hissssst closed 1 year ago

hissssst commented 1 year ago

Could you please improve documentation of fetch operation options?

whitfin commented 1 year ago

@hissssst no, which is why it's not in the options documentation. Working with TTL inside fetch/4 is already documented. Would you suggest changes?

hissssst commented 1 year ago

@whitfin than why does this function have options argument?

whitfin commented 1 year ago

@hissssst to conform to the standard API of every function in the lib.

hissssst commented 1 year ago

This is really strange to be honest. I've never seen an unused argument for options (except for compatibility reason). For me this was misleading ...

Anyway, thanks for the clarification on the original question <з