HackerTrans
TopNewTrendsCommentsPastAskShowJobs

flaghacker

no profile record

Submissions

I've been writing ring buffers wrong all these years (2016)

snellman.net
165 points·by flaghacker·7개월 전·67 comments

comments

flaghacker
·19일 전·discuss
No, I think the comment you're responding to is actually correct. Look at this quote from the Anthropic blog post again:

> The design should have been simple: if a session has been idle for more than an hour, we could reduce users’ cost of resuming that session by clearing old thinking sections. Since the request would be a cache miss anyway, we could prune unnecessary messages from the request to reduce the number of uncached tokens sent to the API. We’d then resume sending full reasoning history. To do this we used the clear_thinking_20251015 API header along with keep:1.

They clearly make the same distinction between the cache and the context. They're saying "we could reduce users’ cost of resuming that session by clearing old thinking sections". They intentionally created a behavior different between cached and uncached requests, specifically they clear thinking sections from the context for requests that miss the cache.
flaghacker
·지난달·discuss
What would be the point of embedding Redis into an application? What's the advantage of using Redis over using the builtin (or third party) data structures of the language the application is developed in?

I'm asking as a non-webdev who never quite got what Redis actually does, but would love to learn.