Newer Version Available
AuraEnabled Annotation
The @AuraEnabled annotation enables client- and server-side access to an Apex controller method. Providing this annotation makes your methods available to your Lightning components. Only methods with this annotation are exposed.
In API version 44.0 and later, you can improve runtime performance by caching method results on the client by using the annotation @AuraEnabled(cacheable=true). You can cache method results only for methods that retrieve data but do not modify it. Using this annotation eliminates the need to call setStorable() in JavaScript code on every action that calls the Apex method.
For more information, see the Lightning Components Developer's Guide.