News for hackers. Stuff that matters.
Re:Building a Cache in Elixir by bluesnowmonkey on Tuesday July 12, 2022 @03:01PM (#32074303)
Yes, match_delete would work. Even a little better, select_delete will return the number of entries that were purged. To delete everything where the third element in a tuple is greater than a constant, should be something like:

  :ets.select_delete(table, [{{:_, :_, :"$1"}, [], [{:>, :"$1", {:const, expires}}]}])

There are no comments on this comment yet.