Commit 5f820729 authored by Mark Harding's avatar Mark Harding

(feat): introduce cassandra counters

parent a303db28
No related merge requests found
Pipeline #68764055 passed with stages
in 7 minutes and 34 seconds
......@@ -50,6 +50,10 @@ class Counters
*/
public function getCount(array $options = [])
{
// return Helpers\Counters::get($this->user, 'notifications:count', false);
// TODO: Remove below once settled
$query = "SELECT uuid, read_timestamp FROM notifications
WHERE to_guid = ?
ORDER BY created_timestamp DESC
......@@ -86,7 +90,7 @@ class Counters
*/
public function increaseCounter()
{
//Helpers\Counters::increment($this->user, 'notifications:count');
Helpers\Counters::increment($this->user, 'notifications:count');
}
/**
......@@ -96,6 +100,10 @@ class Counters
*/
public function resetCounter()
{
Helpers\Counters::clear($this->user, 'notifications:count');
// TODO: Remove below once settled
$query = "BEGIN;
UPDATE notifications
SET read_timestamp = NOW()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment