Skip to content

Negative expire time causes MEMCACHED_MEMORY_ALLOCATION_FAILURE error for ascii protocol but not for binary #125

@camporter

Description

@camporter

Hello, I'm not sure if this has been brought up before, but using negative expiration values for eg set causes a MEMCACHED_MEMORY_ALLOCATION_FAILURE error using the ascii protocol, even though the ascii protocol somewhat supports negative expiration values (after reading through memcached/memcached#142).

The binary protocol takes time_t and passes an unsigned expiration which seems like it would cause large expiration times rather than expiring immediately? Other clients seems to do this though, so maybe that's expected.

Since negative expiration should expire immediately, thoughts on setting the expiration to 1 if negative?

This seems similar to #76

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions