Add memcache ticketRegistry service
Benjamin Renard

Benjamin Renard commited on 2014-12-29 18:06:35
Showing 6 changed files, with 33 additions and 0 deletions.

... ...
@@ -30,3 +30,8 @@ views=default
30 30
 cas.authHandlers=fileHandler
31 31
 
32 32
 
33
+# Memcache Server
34
+memcache.server=127.0.0.1
35
+memcache.port=11211
36
+memcache.TGT.timeout=21600
37
+memcache.ST.timeout=300
... ...
@@ -36,3 +36,8 @@ passfile.location=@passfile.location@
36 36
 #CAS URI (empty for /)
37 37
 cas.uri=@cas.uri@
38 38
 
39
+# Memcache Configuration
40
+memcache.server=@memcache.server@
41
+memcache.port=@memcache.port@
42
+memcache.TGT.timeout=@memcache.TGT.timeout@
43
+memcache.ST.timeout=@memcache.ST.timeout@
... ...
@@ -0,0 +1,23 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<beans xmlns="http://www.springframework.org/schema/beans"
3
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+       xmlns:p="http://www.springframework.org/schema/p"
5
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
6
+    <description>
7
+    	Configuration for the default TicketRegistry which stores the tickets in-memory and cleans them out as specified intervals.
8
+    </description>
9
+       
10
+    <!-- Ticket Registry -->
11
+	<!--
12
+	<bean id="ticketRegistry" class="org.jasig.cas.ticket.registry.DefaultTicketRegistry" />
13
+	-->
14
+	<bean id="ticketRegistry" class="org.jasig.cas.ticket.registry.MemCacheTicketRegistry">
15
+    	<constructor-arg index="0">
16
+    		<list>
17
+    			<value>${memcache.server}:${memcache.port}</value>    			
18
+    		</list>
19
+    	</constructor-arg>
20
+    	<constructor-arg index="1" type="int" value="${memcache.TGT.timeout}" />
21
+    	<constructor-arg index="2" type="int" value="${memcache.ST.timeout}" />
22
+    </bean>
23
+</beans>
0 24
\ No newline at end of file
1 25