Skip to content

Instantly share code, notes, and snippets.

View clonemeagain's full-sized avatar
💭
I may be slow to respond.

Aaron clonemeagain

💭
I may be slow to respond.
View GitHub Profile
@clonemeagain
clonemeagain / class.mod_memcached.php
Last active May 24, 2016 01:53
Mod_Memcached for osTicket 1.7+ Save the below class into /includes/ Modify your main.inc.php to require_once(INCLUDE_DIR.'class.mod_memcached.php'); beneath the existing requires. View second "file" for an example uses.. the tickets.inc.php is the best.. and has the most impact on larger installs.
<?php
define ( 'MEMCACHED_LOCATION', 'localhost' ); // Change to your memcached implementation.. should be possible to access multiple memcache servers in future if necessary.
define ( 'MEMCACHED_PORT', '11211' ); // Port number. Don't forget to allow this over the network if not local.
define ( 'MEMCACHED_PREFIX', 'ost-' ); // must be unique on server This references osTickets specifically.
define ( 'MEMCACHED_DEFAULT_TIMEOUT', 3600 ); // 1 hour.
define ( 'MEMCACHED_DEBUGMODE', true ); // set to true to show cache deletions and populations in apache logs.
/**
* Abstract extendible class containing PHP Memcached functions that facilitate and ease use for applications and mini-calls.
* ;-)