Giter VIP home page Giter VIP logo

memcached-for-tcl's Introduction

Linux CI

memcached-for-Tcl

Memcached is a data caching service that can be used to accelerate computations or operations that are repeated frequently, but do not often change. This package provides a Tcl interface to the memcached servers.

Installation

The actual memcached server installation is independent of the installation of this client package and is not addressed by this document.

On FreeBSD:

  • pkg install databases/libmemcached
  • env CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --with-tcl=/usr/local/lib/tcl8.6
  • make
  • make install

Usage

To begin using this package, you must require it and then configure the address of your local memcached servers. If you have more than one memcached server then you can repeat the "memcache server" line for each additional server you have.

package require Memcache
memcache server add servername.example.com 11211

To set a value into the memcached server, use the following syntax to define a key named "moo":

memcache set moo "cows go moo"

To fetch this same value back from the memcached server and write it into the "result" variable, use this syntax:

memcache get moo result

All of the memcache commands will return an integer code that is zero on success or some other integer error. If the returned value is non-zero then the request failed, and you should not expect any varname arguments to have been modified.

Available Commands

memcache server add hostname port

memcache get key varname ?lengthVar? ?flagsVar?

memcache add key value ?expires? ?flags?

memcache append key value ?expires? ?flags?

memcache prepend key value ?expires? ?flags?

memcache set key value ?expires? ?flags?

memcache replace key value ?expires? ?flags?

memcache delete key ?expires?

memcache flush ?expires?

memcache incr key value ?varname?

memcache decr key value ?varname?

memcache version

memcache behavior flagname ?flagvalue?

memcached-for-tcl's People

Contributors

bovine avatar ray2501 avatar tomtung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.