Faheetah / relaxir

Online recipe book written in Elixir and Phoenix
0 stars 0 forks source link

Add pagination to search results #27

Open Faheetah opened 2 years ago

Faheetah commented 2 years ago

Endless scroll would be ideal, need a way to realistically chunk ETS results so we don't end up parsing through each time, though the farther the scrolling gets less and less likely. Might do something like micro-cache results, for something like a minute, then if someone does scroll it can just pick up from that result set and continue, search is blazing fast already so I'm not worried about any overhead from checking a cached result. Only main concern is need to set an upper limit for microcache size to prevent DOS. After something like 1gb of cache used start dumping the oldest cached results.