Git Product home page Git Product logo

memcache's People

Contributors

bradfitz avatar d2fn avatar fiam avatar jgrahamc avatar rhencke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

memcache's Issues

Can't set expiration

I can't seem to get the Expiration property to be set:

package main

import (
    // "github.com/bradfitz/gomemcache/memcache" // "io/ioutil"
    "github.com/rainycape/memcache"
    "log"
)

func main() {
    mc, errc := memcache.New("72.2.112.213:11211")
    mc.Set(&memcache.Item{Key: "foo", Value: []byte("my value"), Expiration: 604800})

    it, err := mc.Get("foo")

    log.Print(it.Key)
    log.Print(string(it.Value))
    log.Print(it.Expiration)
    log.Print(err)

}

outputs:

go run mc.go
2016/10/13 08:50:48 foo
2016/10/13 08:50:48 my value
2016/10/13 08:50:48 0
2016/10/13 08:50:48 <nil>

Where I feel it should output 604800 instead of 0.

Note that I see the same issue with bradfitz/gomemcache. Can you help?

P.S. your readme.md example doesn't take into account that memcache.New() now returns multiple values.


go version go1.7.1 darwin/amd64
memcached:1.4.24

Go 1.10: memcache_test.go:45: Skip call has possible formatting directive %s

1031fa0 does not pass unit test with Go 1.10

+ GOPATH=/builddir/build/BUILD/memcache-1031fa0ce2f20c1c0e1e1b51951d8ea02c84fa05/_build:/usr/share/gocode
+ go test -buildmode pie -compiler gc -ldflags '-extldflags '\''-Wl,-z,relro  '\'''
# github.com/rainycape/memcache
./memcache_test.go:45: Skip call has possible formatting directive %s
FAIL    github.com/rainycape/memcache [build failed]

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.