summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-23 05:03:19 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-23 05:03:19 -0400
commit640628de2d593933e810b4785dfe38923b979713 (patch)
tree78787c9a248a0f757dffb622691c822d1b2cc4cd /lib/util.php
parent0dd90461cdc7aad26b6f855ca7f63988a4a74d74 (diff)
A queuehandler for blowing caches offline
We add a queuehandler for blowing the memcached caches off-line. This should speed up the processing of new notices.
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index e0eda0114..12797891c 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -879,7 +879,17 @@ function common_broadcast_notice($notice, $remote=false)
function common_enqueue_notice($notice)
{
- foreach (array('jabber', 'omb', 'sms', 'public', 'twitter', 'facebook', 'ping') as $transport) {
+ $transports = array('omb', 'sms', 'twitter', 'facebook', 'ping');
+
+ if (common_config('xmpp', 'enabled')) {
+ $transports = array_merge($transports, array('jabber', 'public'));
+ }
+
+ if (common_config('memcached', 'enabled')) {
+ $transports[] = 'memcached';
+ }
+
+ foreach ($transports as $transport) {
$qi = new Queue_item();
$qi->notice_id = $notice->id;
$qi->transport = $transport;
@@ -1332,7 +1342,7 @@ function common_compatible_license($from, $to)
*/
function common_database_tablename($tablename)
{
-
+
if(common_config('db','quote_identifiers')) {
$tablename = '"'. $tablename .'"';
}