Every http request from the browser accompanies the user credentials. If an html page contains links to resources like images, loading one htm page can trigger many more http requests. Each request has to be authenticated before the web server accesses the resources and fulfills the request.
If each authentication requires database access, this can cause performance problems. Therefore, once a client request is authenticated, it is desireable to cache the authenticated user credentials in cache and use this cache for further authentication needs for a specified amount of time.
This has the side effect that once the userid and password is deleted from the database, it may still have access to the system until the cached credentials expire.