It’s pretty clear to me that the only thing that gets put into the caches are 
the top N rows.

It may fetch more, but it doesn’t cache it. It may get more if its not the full 
partition cache, but theres no code that inserts into the CacheService except

Rahul Singh

Anant Corporation

On Mar 12, 2018, 8:56 AM -0400, Hannu Kröger <>, wrote:
> > On 12 Mar 2018, at 14:45, Rahul Singh <> wrote:
> >
> > I may be wrong, but what I’ve read and used in the past assumes that the 
> > “first” N rows are cached and the clustering key design is how I change 
> > what N rows are put into memory. Looking at the code, it seems that’s the 
> > case.
> So we agree that we row cache is storing only N rows from the beginning of 
> the partition. So if only the last row in a partition is read, then it 
> probably doesn’t get cached assuming there are more than N rows in a 
> partition?
> > The language of the comment basically says that it holds in cache what 
> > satisfies the query if and only if it’s the head of the partition, if not 
> > it fetches it and saves it - I dont interpret it differently from what I 
> > have seen in the documentation.
> Hmm, I’m trying to understand this. Does it mean that it stores the results 
> in cache if it is head and if not, it will fetch the head and store that 
> (instead of the results for the query) ?
> Hannu

Reply via email to