Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 408 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 408 Bytes

CDI Cache Extension

An extension CDI for cache method results.

##How to use

Simply add the @Cacheable annotation on method and inject the bean normally.

import java.util.concurrent.TimeUnit;
import br.com.logique.methodcache.Cacheable;

public class MyBean{

    @Cacheable(lifeTime = 30, unit = TimeUnit.SECONDS)
    void doSomething(String arg) {
        //do something slow
    }
    
}