Skip to content

Conversation

@dkz2
Copy link
Contributor

@dkz2 dkz2 commented Aug 3, 2023

This PR address the need to enhance our memcached functionality with append and prepend operation support. These operations enable modifying stored key-value pairs by appending and prepending data to the existing values, reading the need for read-modifying-write cycles. This PR will close #19.

Motivation:
To improve our interactions with memcached servers in a more dynamic and versatile way. Append and Prepend operations not only increase cache efficiency by minimizing network round trips for data modification but also broadens our API capabilities.

Modifications:

  • Added append and prepend methods to MemcachedConnection.
  • Created a StorageMode enum that represent the different ways data can be stored or manipulated for a particular key.
  • Added storageMode property to MemcachedFlags to specify whether he operation is append or prepend.
  • Added Unit test and Integration test.

Results:
With the addition of append and prepend support, our API now allows users to modify existing data in the cache directly, improving cache efficiency and expanding the versatility of our API.

@dkz2 dkz2 marked this pull request as ready for review August 3, 2023 05:32
@FranzBusch FranzBusch merged commit 2ac2b44 into swift-server:main Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants