Comment by wood-porch Comment by wood-porch a day ago 1 reply Copy Link View on Hacker News Doesn't that shift the problem to caching false then :D
Copy Link RangerScience a day ago Collapse Comment - you can probably always just do something like: def no_items? !items.present? end def items # something lone end memoize :items, ttl: 60, max_size: 10` just makes sure the expensive operation results in a truthy value, then add some sugar for the falsey value, done. Reply View | 0 replies
you can probably always just do something like:
just makes sure the expensive operation results in a truthy value, then add some sugar for the falsey value, done.