Simple-spring-memcached those things three

Source: Internet
Author: User

@cachename: Specify cache instance annotations

@Cachekeymethod: cache key Generation annotations

---------------------------------Read-------------------------------------------

@Readthroughassigncache(assignedkey = "Somephatkey", Namespace = "Echo", expiration = +): reads the specified key cache

@Readthroughsinglecache(namespace = single_ns, expiration = 0): reads a single cache

@readthroughmulticache(option = @readthroughmulticacheoption(Generatekeysfromresult = True)): Read multiple caches

@readthroughmulticacheoption(Generatekeysfromresult = true) read multiple cache operations Generatekeysfromresult generate key by result

---------------------------------Update-------------------------------------------

@Updateassigncache(assignedkey = "Somephatkey", Namespace = "Echo", expiration = +): Specifies the key to update the cache

@Updatesinglecache(namespace = single_ns, expiration = 2): update a single cache (namespace namespace, expiration failure time unit seconds)

@Updatemulticache(namespace = "Bravo", expiration = +): Update multiple caches

---------------------------------Failure-------------------------------------------

@Invalidateassigncache(assignedkey = "Somephatkey", Namespace = "Echo"): Specifies the key invalidation cache

@Invalidatesinglecache(Namespace = Single_ns): failed single cache

@Invalidatemulticache(namespace = "Delta"): failed multiple caches

---------------------------------parameter-------------------------------------------

@parameterdataupdatecontent: The parameter of the tag method as the update content. This annotation should be used in conjunction with Update*cache annotations

@ParameterValueKeyProvider: mark the parameter of the method as the compute cache key. If the method annotated object is tagged Cachekeymethod method will be used to generate the cache key otherwise call ToString () to generate

The @ParameterValueKeyProvider (order=0) property indicates that the parameter order should be supplied if multiple arguments are key

Annotations similar to @Parametervaluekeyprovider are:

{

@returnvaluekeyprovider: calculates key in the return value object

}

---------------------------------Generic processing-------------------------------------------

@bridgemethodmappings({@bridgemethodmapping(methodName = "UpdateUser",

Erasedparamtypes = {Object.class}, Targetparamtypes = {appuser.class})}): generic bridging annotations

methodName : Specifying Methods

erasedparamtypes : Erasing object Types

targetparamtypes : target conversion type

---------------------------------counter-------------------------------------------

@InvalidateAssignCache : add 1 to the calculator. Initialize to 1 if not present

@DecrementCounterInCache : minus 1 on the given counter

@ReadCounterFromCache : reading counters

@UpdateCounterFromCache : Update Counters


Simple-spring-memcached those things three

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.