-
-
Save timsayshey/15a98537576364998a28606c80a91172 to your computer and use it in GitHub Desktop.
Lucee Database Client Storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
this.datasources["lucee_sessions"] = { | |
class: 'org.gjt.mm.mysql.Driver' | |
, connectionString: 'jdbc:mysql://192.168.33.10:3306/lucee_sessions?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true' | |
, username: 'lucee_sessions' | |
, password: "encrypted:8c3ea865feab8133a7614f58aee150cddee0ed6f82a476f1" | |
// optional settings | |
, storage:true // default: false | |
}; | |
this.sessionTimeout = createTimeSpan(0,0,20,0); //Set a default session timeout of 20 minutes | |
this.sessionStorage = "lucee_sessions"; //Set our session storage to the lucee_sessions datasource | |
this.clientTimeout = createTimeSpan(0,1,0,0); | |
this.clientManagement = true; | |
this.clientStorage = "lucee_sessions"; | |
this.clientCluster = true; //Set true if more than one Lucee instance connected to the same client store | |
function onSessionStart(){ | |
session.someData = "My Data"; | |
} | |
function onRequestStart(){ | |
client.myData = "My Client Data"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfdump var="#now()#"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment