doFilter - all request coming through it - will this cause performance bottle neck | Community
Skip to main content
Level 4
October 16, 2015
Solved

doFilter - all request coming through it - will this cause performance bottle neck

  • October 16, 2015
  • 1 reply
  • 684 views

Hi everyone.

 
My requirement is to forcefully logout user after some specific time (say 12 hrs). For logging out we will delete the user cookie created during login. We are thinking to use doFilter to achive this. When a user logs in we will add timestamp to user cookie and then on every subsequent request we will check current time - user login time > 12 then we will delete the user cookies.
 
This doFilter code is working fine. I am getting what I need.
 
But what I observe that now every request to CQ is coming to this Filter. Will this cause performance issue on production since any activity on site will come to doFilter ? Is there any other better way to achieve this ? 
 
Any setting I can do in doFilter ?

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

If you register a filter on a request level, every request going to this instance will go through this filter.

Regarding your specific usecase: When a user is logged in, a ".tokens" node is created in the user home. If you remove this note, the user needs to relogin.

Jörg

1 reply

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

If you register a filter on a request level, every request going to this instance will go through this filter.

Regarding your specific usecase: When a user is logged in, a ".tokens" node is created in the user home. If you remove this note, the user needs to relogin.

Jörg