Zeus User Community
Independent community for users of
Zeus Technologies
products.
Home
Help
Search
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
July 29, 2010, 07:43:42 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Zeus User Community
>
Zeus Products
>
Zeus Traffic Manager
>
Delete session persistence?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Delete session persistence? (Read 2736 times)
dward
Newcomer
Posts: 1
Delete session persistence?
«
on:
October 12, 2007, 04:17:17 PM »
Is there anyway to delete a persistence key or at least set a timeout for the key?
Logged
michael
Senior
Posts: 21
Re: Delete session persistence?
«
Reply #1 on:
November 14, 2007, 07:15:45 PM »
No, there isn't. The only way for entries to get kicked out is by not being used while new entries are added to the system. When the capacity of the cache is reached, the entry which hasn't been used longest is removed to make space for new entries.
The cache size can be set via System- > Global Settings -> Cache Settings.
Logged
Owen
Expert
Posts: 31
Re: Delete session persistence?
«
Reply #2 on:
November 21, 2007, 02:16:40 PM »
You can index the session persistence with a cookie; then deleting the cookie will be sufficient to make ZXTM 'forget' the session persistence. Depending on the application, you may be able to use a cookie that the application sets, or you can create your own cookie specially for this purpose.
For example, suppose that you want to persist all jsp pages to the same back-end server, but 'forget' the session persistence once the user accesses the 'logout.jsp' page. Something like the following, using a 'Universal Session Persistence' class, might do the trick:
$url = http.getPath();
# We're only interested in .jsp pages
if( ! string.endswith( $url, ".jsp" ) ) break;
# Get the session persistence cookie
$cookie = http.getCookie( "MySession" );
# If the user hasn't got a cookie (i.e. first time in, or we've deleted the session persistence)
# create a new, random cookie.
if( ! $cookie ) {
$rand = math.random( 0xfffffff ) . sys.time() . request.getRemoteIP();
$cookie = string.hexencode( string.hashMD5( $rand ) );
http.setResponseCookie( "MySession", $cookie );
}
if( $url == "/logout.jsp" ) {
# Clear the cookie in the response, so that next time in we create a new one
http.setResponseCookie( "MySession", "" );
}
# Persist on the value of the cookie
connection.setPersistenceKey( $cookie );
connection.setPersistence( "My Session Persistence Class" );
Logged
Owen Garrett
Product Management, Zeus Technology,
http://www.zeus.com/
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Discussion
-----------------------------
Zeus Products
-----------------------------
=> Zeus Traffic Manager
=> Zeus Application Firewall Module
=> Zeus Global Load Balancer
=> Zeus Web Server
Loading...