<?xml version="1.0" encoding="ISO-8859-1"?><page xmlns:xsp="http://apache.org/xsp" xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0">
    <title>Demonstrating Event-Aware Caching or Database Generated Pages.</title>
    <content>
    	<para>
	    	This xsp page is based on (copied from) the event aware cacheable
            xsp sample.
    	</para>
        <para>
            I pause for 2 seconds during generation, so
            that you can tell if I'm being served from the cache or not.
            <br/>
            What you see here was generated on <b>Sun Jun 07 13:10:09 WIB 2026</b>.
        </para>

        <para>
            I'm cached for a specific database table name: <b>user</b>.
            Other parameters ie. request parameters do not matter.
        </para>

		<para>
			Unlike other cacheable pages in Cocoon, I can be un-cached by events external
			to Cocoon - for instance, when a database table or row is updated. I will also
            be invalidated when the XSP source is modified.
			<br/>
			My cache entry will be invalidated (actually, removed) when an event named
			<i>user</i> occurs. Go to the
            <a href="../../databases/mod-db/user-list">database samples</a> and modify,
            insert, or delete a user and check if this page is updated.
		</para>

        <para>Test links:
            <ul>
                <li><a href="invalidate?table=user">uncache with action</a></li>
                <li><a href="jms-invalidate?table=user">uncache with action emitting JMS messages</a><br/>
                    This is particularily useful if your DBMS of choice can easily do HTTP
                    requests but hooking on JMS would be difficult. Still you would like to
                    control several Cocoon caches through JMS.
                </li>
                <li><a href="install?what=http">install HTTP database triggers with HSQLDB</a><br/>
                    For the HTTP example triggers, this sample needs to be available at
                    <b>http://localhost:8888/samples/jms/database/eventcache</b> because
                    that location is hard-coded into the trigger. This is usually the case if you
                    have started the provided <i>cocoon.sh</i> resp. <i>cocoon.bat</i>.
                </li>
                <li><a href="install?what=jms">install JMS database triggers with HSQLDB</a><br/>
                    For the JMS example triggers, you need to have setup a JMS system, e.g.
                    <a href="http://openjms.sf.net">OpenJMS</a></li>
                <li><a href="remove">uninstall database triggers</a></li>
            </ul>
        </para>

        <para>
          
                  <table>
                    <tbody>
                      
                        <tr>
                          <td/>
                          <td/>
                          <td/>
                          <td>4</td>
                        </tr>
                      
                        <tr>
                          <td>'</td>
                          <td/>
                          <td/>
                          <td>140</td>
                        </tr>
                      
                        <tr>
                          <td>' ORDER BY 999999999999; -- '</td>
                          <td/>
                          <td/>
                          <td>62</td>
                        </tr>
                      
                        <tr>
                          <td>'', (SELECT CONCAT('GWEa4', 'GWEa4')) -- '</td>
                          <td/>
                          <td/>
                          <td>276</td>
                        </tr>
                      
                        <tr>
                          <td>'', (SELECT CONCAT('_Lmnk', '_Lmnk')) -- '</td>
                          <td/>
                          <td/>
                          <td>64</td>
                        </tr>
                      
                        <tr>
                          <td>'+</td>
                          <td/>
                          <td/>
                          <td>144</td>
                        </tr>
                      
                        <tr>
                          <td>'+(SELECT CONCAT('Tqcyc', 'f7trz'))+'</td>
                          <td/>
                          <td/>
                          <td>53</td>
                        </tr>
                      
                        <tr>
                          <td>'+(SELECT CONCAT('mbsPr', 'MRVVn'))+'</td>
                          <td/>
                          <td/>
                          <td>262</td>
                        </tr>
                      
                        <tr>
                          <td>', add-group = (SELECT CONCAT('DzitI', 'LBwo6')) -- '</td>
                          <td/>
                          <td/>
                          <td>270</td>
                        </tr>
                      
                        <tr>
                          <td>', add-group = (SELECT CONCAT('aT9mT', '63Bgo')) -- '</td>
                          <td/>
                          <td/>
                          <td>59</td>
                        </tr>
                      
                        <tr>
                          <td>', add-user-groups = (SELECT CONCAT('0SDNx', 'Pb4se')) -- '</td>
                          <td/>
                          <td/>
                          <td>263</td>
                        </tr>
                      
                        <tr>
                          <td>', add-user-groups = (SELECT CONCAT('865Sf', 'fVV68')) -- '</td>
                          <td/>
                          <td/>
                          <td>54</td>
                        </tr>
                      
                        <tr>
                          <td>', del-group = (SELECT CONCAT('GScdv', 'g6I6D')) -- '</td>
                          <td/>
                          <td/>
                          <td>269</td>
                        </tr>
                      
                        <tr>
                          <td>', del-user = (SELECT CONCAT('ahJQN', 'dbRg5')) -- '</td>
                          <td/>
                          <td/>
                          <td>60</td>
                        </tr>
                      
                        <tr>
                          <td>', del-user = (SELECT CONCAT('kId6_', '_R3ad')) -- '</td>
                          <td/>
                          <td/>
                          <td>272</td>
                        </tr>
                      
                        <tr>
                          <td>', groups.gid = (SELECT CONCAT('pFhTx', '2BVfM')) -- '</td>
                          <td/>
                          <td/>
                          <td>271</td>
                        </tr>
                      
                        <tr>
                          <td>', groups.gname = (SELECT CONCAT('Hf4qB', '0ZPaq')) -- '</td>
                          <td/>
                          <td/>
                          <td>264</td>
                        </tr>
                      
                        <tr>
                          <td>', groups.gname = (SELECT CONCAT('fB8tV', 'AkbAk')) -- '</td>
                          <td/>
                          <td/>
                          <td>55</td>
                        </tr>
                      
                        <tr>
                          <td>', upd-group = (SELECT CONCAT('Tqoqp', 'Waliq')) -- '</td>
                          <td/>
                          <td/>
                          <td>266</td>
                        </tr>
                      
                        <tr>
                          <td>', user.firstname = (SELECT CONCAT('LpcNY', 'KSNyo')) -- '</td>
                          <td/>
                          <td/>
                          <td>273</td>
                        </tr>
                      
                        <tr>
                          <td>', user.firstname = (SELECT CONCAT('vmTnm', 'bp4BF')) -- '</td>
                          <td/>
                          <td/>
                          <td>61</td>
                        </tr>
                      
                        <tr>
                          <td>', user.name = (SELECT CONCAT('JgfH2', 'KMqjz')) -- '</td>
                          <td/>
                          <td/>
                          <td>58</td>
                        </tr>
                      
                        <tr>
                          <td>', user.name = (SELECT CONCAT('vduj7', 'fTIP5')) -- '</td>
                          <td/>
                          <td/>
                          <td>268</td>
                        </tr>
                      
                        <tr>
                          <td>', user.uid = (SELECT CONCAT('DW93o', 'xbByN')) -- '</td>
                          <td/>
                          <td/>
                          <td>57</td>
                        </tr>
                      
                        <tr>
                          <td>', user.uid = (SELECT CONCAT('Vd1EP', 'qjbN3')) -- '</td>
                          <td/>
                          <td/>
                          <td>267</td>
                        </tr>
                      
                        <tr>
                          <td>', user_groups.gid = (SELECT CONCAT('l8UGZ', 'TjW5S')) -- '</td>
                          <td/>
                          <td/>
                          <td>56</td>
                        </tr>
                      
                        <tr>
                          <td>', user_groups.gid = (SELECT CONCAT('m6EiZ', 'ZlPZN')) -- '</td>
                          <td/>
                          <td/>
                          <td>265</td>
                        </tr>
                      
                        <tr>
                          <td>','') #'</td>
                          <td/>
                          <td/>
                          <td>63</td>
                        </tr>
                      
                        <tr>
                          <td>'||</td>
                          <td/>
                          <td/>
                          <td>141</td>
                        </tr>
                      
                        <tr>
                          <td>/0</td>
                          <td/>
                          <td/>
                          <td>142</td>
                        </tr>
                      
                        <tr>
                          <td>IsNHIvHDio</td>
                          <td/>
                          <td/>
                          <td>11</td>
                        </tr>
                      
                        <tr>
                          <td>_QSETSoqyi</td>
                          <td/>
                          <td/>
                          <td>180</td>
                        </tr>
                      
                        <tr>
                          <td>".exit(md5('w4p1t1_md5'));#</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>356</td>
                        </tr>
                      
                        <tr>
                          <td>".exit(md5('w4p1t1_md5'));//</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>355</td>
                        </tr>
                      
                        <tr>
                          <td>";exit(md5('w4p1t1_md5'));#</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>352</td>
                        </tr>
                      
                        <tr>
                          <td>";exit(md5('w4p1t1_md5'));//</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>351</td>
                        </tr>
                      
                        <tr>
                          <td>&amp;ping -n 25 127.0.0.1&amp;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>366</td>
                        </tr>
                      
                        <tr>
                          <td>&amp;set&amp;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>345</td>
                        </tr>
                      
                        <tr>
                          <td>'.exit(md5('w4p1t1_md5'));#</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>358</td>
                        </tr>
                      
                        <tr>
                          <td>'.exit(md5('w4p1t1_md5'));//</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>357</td>
                        </tr>
                      
                        <tr>
                          <td>';exit(md5('w4p1t1_md5'));#</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>354</td>
                        </tr>
                      
                        <tr>
                          <td>';exit(md5('w4p1t1_md5'));//</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>353</td>
                        </tr>
                      
                        <tr>
                          <td>../../../../../../../../../../../../../../../usr/bin/env|</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>487</td>
                        </tr>
                      
                        <tr>
                          <td>/e</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>348</td>
                        </tr>
                      
                        <tr>
                          <td>;env;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>339</td>
                        </tr>
                      
                        <tr>
                          <td>;exit(md5('w4p1t1_md5'));#</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>360</td>
                        </tr>
                      
                        <tr>
                          <td>;exit(md5('w4p1t1_md5'));//</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>359</td>
                        </tr>
                      
                        <tr>
                          <td>a);env;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>342</td>
                        </tr>
                      
                        <tr>
                          <td>a;env;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>341</td>
                        </tr>
                      
                        <tr>
                          <td>a;exit(md5('w4p1t1_md5'));#</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>350</td>
                        </tr>
                      
                        <tr>
                          <td>a;exit(md5('w4p1t1_md5'));//</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>349</td>
                        </tr>
                      
                        <tr>
                          <td>a;sleep 60;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>364</td>
                        </tr>
                      
                        <tr>
                          <td>a`)`</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>362</td>
                        </tr>
                      
                        <tr>
                          <td>a`sleep 60`</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>363</td>
                        </tr>
                      
                        <tr>
                          <td>alice</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>277</td>
                        </tr>
                      
                        <tr>
                          <td>alice
env;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>344</td>
                        </tr>
                      
                        <tr>
                          <td>alice;env;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>343</td>
                        </tr>
                      
                        <tr>
                          <td>a|sleep 60;</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>365</td>
                        </tr>
                      
                        <tr>
                          <td>data:;base64,PD9waHAgZWNobyAndzRwMXQxJywnX2V2YWwnOyA/Pg==</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>361</td>
                        </tr>
                      
                        <tr>
                          <td>env</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>347</td>
                        </tr>
                      
                        <tr>
                          <td>set</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>346</td>
                        </tr>
                      
                        <tr>
                          <td>|env</td>
                          <td>alice</td>
                          <td>alice</td>
                          <td>340</td>
                        </tr>
                      
                    </tbody>
                  </table>
               
        </para>

        <para>
          Please refer to the <a href="../../eventcache/">event based cache example</a> for more details
          on the event based cache invalidation.
        </para>

        
    </content>
  </page>