Skip to content

Implement Append and Prepend Support #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2023

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Append and Prepend Support
2 participants