GoogleCloudPlatform / GoogleCloudPlatform/appengine-php-sdk
Memcache: Honor the expiry parameter in increment() and decrement()
- Dominant language
- PHP
- Stars
- 29
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
`incrementInternal()` accepts the documented `$expiry` argument but never uses it — `MemcacheIncrementRequest` has no expiration field — so any item created through the `initial_value` path is stored without an expiration and lives until evicted. Callers using `increment()` for rate limiting or short-lived counters accumulate immortal keys, and patterns that rely on expiry to self-heal (e.g. a worker counter that must reset after a crash) never recover.
Contributor guide
Research direction
Start at incrementInternal() and trace how its documented $expiry argument becomes a MemcacheIncrementRequest. Ensure the initial_value path preserves expiration behavior, then verify that increment() and decrement() no longer create immortal keys when an expiry is supplied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- memcached, php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100