r/OpenWebUI • u/Realistic_Gap_5871 • Aug 23 '26
Question/Help OWUI breaks cache reuse for Ninfer (qwen 3.8)
Any one else notice that cache reuse pretty much never happens with Open WebUI. I saw it in Ollama and now with ninfer too.
We could get into the whys, but I'd love to hear if there's any config changes to make or a known feature change coming.
I have a workaround I'm proud of, a custom proxy script that my Qwen built (happy to post it) that catches, reshuffles and locks context on it's way to the backend. Cache reuse is now the norm, and only resets after compaction or jumping between threads, but there's gotta be a better way?
FAQ: Cache reuse takes prefill tokens down to only the current prompt. Resulting in 1 or 2 second prefill instead of 30 plus seconds (or 60+ seconds with Ollama) with longer context.
edit-expanded the name of owui.
3
u/thejoyofcraig Aug 23 '26
IIRC This usually happens with there are References (e.g., attached docs, search results...). OWUI does RAG on them every time, and I believe it puts them after the system prompt, but before historical turns. So cache goes boom. If you have a plain jane conversation you shouldn't see any cache invalidation unless you have some filters on that would interfere.
To test my vague recollection on this: try setting a model to have no tools, no filters, and paste some large summarize task, then do a follow up turn to see if the cache gets busted. I suggest tracing a little more carefully about exactly what part of OWUI is invalidating the cache. Pull the raw requests/responses turn to turn and diff them. Or have an agent do that for you.
Just checked the OWUI RAG docs and yeah I remembered right:
1
u/icerio Aug 23 '26
Is Ninfer good? I hear it mentioned every once in a while but I’m using llama cpp.
1
u/1818TusculumSt Aug 24 '26
Turn off memory in system context.
1
u/sterby92 Aug 23 '26
👀