Is it possible to implement a php session handler with arangodb

I sent my question a few days ago to the arangodb official website, but no one answered that no one was answering it. therefore I come here. below is my question:

just want to know if you use arangoDb as php sessionHandler, how can I delete session data that has expired!

if you use mogodb or mysql to store session data, we can use this operator to delete obsolete data: db.session.remove ({expire: {$ gt:}}) or sql: remove from tbl_session, where expire <: expire

I just want to know how this can be implemented in arangodb. :)

+3
source share
2 answers

AQL. :

var q = db._query("FOR s in session filter s.expire < 1393231738788 return s");
while (q.hasNext()) {
  db.session.remove(q.next());
}
+3

mchacki , ArangoDB 2.2.

2.2 , :

FOR s IN sessions
  FILTER s.expire < DATE_NOW()-86400000
  REMOVE s IN sessions

.

+1

All Articles