TreeFrogFramework  2.8
Public Member Functions | Friends | List of all members
TMemcached Class Reference

#include <tmemcached.h>

Public Member Functions

 TMemcached ()
 
virtual ~TMemcached ()
 
bool isOpen () const
 
QByteArray get (const QByteArray &key, uint *flags=nullptr)
 
int64_t getNumber (const QByteArray &key, bool *ok=nullptr, uint *flags=nullptr)
 
bool set (const QByteArray &key, const QByteArray &value, int seconds, uint flags=0)
 
bool set (const QByteArray &key, int64_t value, int seconds, uint flags=0)
 
bool add (const QByteArray &key, const QByteArray &value, int seconds, uint flags=0)
 
bool add (const QByteArray &key, int64_t value, int seconds, uint flags=0)
 
bool replace (const QByteArray &key, const QByteArray &value, int seconds, uint flags=0)
 
bool replace (const QByteArray &key, int64_t value, int seconds, uint flags=0)
 
bool append (const QByteArray &key, const QByteArray &value, int seconds, uint flags=0)
 
bool prepend (const QByteArray &key, const QByteArray &value, int seconds, uint flags=0)
 
bool remove (const QByteArray &key)
 
uint64_t incr (const QByteArray &key, uint64_t value, bool *ok=nullptr)
 
uint64_t decr (const QByteArray &key, uint64_t value, bool *ok=nullptr)
 
bool flushAll ()
 
QByteArray version ()
 

Friends

class TCacheMemcachedStore
 

Detailed Description

The TMemcached class provides a means of operating a Memcached system.

Edit conf/memcached.ini and conf/application.ini to use this class.

memcached.ini:

HostName=xxx.xxx.xxx.xxx
UserName=
Password=

application.ini:

MemcachedSettingsFile=memcached.ini
@ MemcachedSettingsFile
Definition: tfnamespace.h:148

See also memcached documentation.

Constructor & Destructor Documentation

◆ TMemcached()

TMemcached::TMemcached ( )

Constructs a TMemcached object.

◆ ~TMemcached()

virtual TMemcached::~TMemcached ( )
inlinevirtual

Member Function Documentation

◆ add() [1/2]

bool TMemcached::add ( const QByteArray &  key,
const QByteArray &  value,
int  seconds,
uint  flags = 0 
)

◆ add() [2/2]

bool TMemcached::add ( const QByteArray &  key,
int64_t  value,
int  seconds,
uint  flags = 0 
)

◆ append()

bool TMemcached::append ( const QByteArray &  key,
const QByteArray &  value,
int  seconds,
uint  flags = 0 
)

◆ decr()

uint64_t TMemcached::decr ( const QByteArray &  key,
uint64_t  value,
bool *  ok = nullptr 
)

◆ flushAll()

bool TMemcached::flushAll ( )

◆ get()

QByteArray TMemcached::get ( const QByteArray &  key,
uint *  flags = nullptr 
)

◆ getNumber()

int64_t TMemcached::getNumber ( const QByteArray &  key,
bool *  ok = nullptr,
uint *  flags = nullptr 
)

◆ incr()

uint64_t TMemcached::incr ( const QByteArray &  key,
uint64_t  value,
bool *  ok = nullptr 
)

◆ isOpen()

bool TMemcached::isOpen ( ) const

Returns true if the Memcached connection is open; otherwise returns false.

◆ prepend()

bool TMemcached::prepend ( const QByteArray &  key,
const QByteArray &  value,
int  seconds,
uint  flags = 0 
)

◆ remove()

bool TMemcached::remove ( const QByteArray &  key)

◆ replace() [1/2]

bool TMemcached::replace ( const QByteArray &  key,
const QByteArray &  value,
int  seconds,
uint  flags = 0 
)

◆ replace() [2/2]

bool TMemcached::replace ( const QByteArray &  key,
int64_t  value,
int  seconds,
uint  flags = 0 
)

◆ set() [1/2]

bool TMemcached::set ( const QByteArray &  key,
const QByteArray &  value,
int  seconds,
uint  flags = 0 
)

◆ set() [2/2]

bool TMemcached::set ( const QByteArray &  key,
int64_t  value,
int  seconds,
uint  flags = 0 
)

◆ version()

QByteArray TMemcached::version ( )

Friends And Related Function Documentation

◆ TCacheMemcachedStore

friend class TCacheMemcachedStore
friend

The documentation for this class was generated from the following files: