roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Feature request: customizable expiration for CasMutator #184

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using?
2.7

On what operating system?
CentOS

Tell me more...
I want to be able to do something like:
public List<Item> addItem(final Item newItem) throws Exception {
    CASMutation<List<Item>> mutation = new CASMutation<List<Item>>() {
        @Override
        public List<Item> getNewValue(List<Item> current) {
            ....
        }

        @Override
        public int getNewExpiration(List<Item> current) {
            ....
        }
    };

    ....
    return mutator.cas(key, initialValue, initialExp, mutation);
}

This would allow the user to implement a customizable expiration based on the 
eventual stored list.

Original issue reported on code.google.com by siou...@gmail.com on 6 Jul 2011 at 6:58

GoogleCodeExporter commented 9 years ago
Would be good to have this, yes.  Have you made any of these changes by chance?

Original comment by ingen...@gmail.com on 22 Nov 2011 at 4:33

GoogleCodeExporter commented 9 years ago
Been really busy at work lately. Hopefully I'll get a chance to look into it 
soon :)

Original comment by siou...@gmail.com on 24 Nov 2011 at 3:21