GUAC-1126 Add caching of GET requests in REST API services.
This commit is contained in:
1 parent
5eb4ab99c6
commit
91b0d72a60
6 files changed
+165
-24
No files matched your search
@@ -23,9 +23,14 @@
|
||||
/**
|
||||
* Service for operating on protocol metadata via the REST API.
|
||||
*/
|
||||
angular.module('rest').factory('protocolService', ['$http', 'authenticationService',
|
||||
function protocolService($http, authenticationService) {
|
||||
|
||||
angular.module('rest').factory('protocolService', ['$injector',
|
||||
function protocolService($injector) {
|
||||
|
||||
// Required services
|
||||
var $http = $injector.get('$http');
|
||||
var authenticationService = $injector.get('authenticationService');
|
||||
var cacheService = $injector.get('cacheService');
|
||||
|
||||
var service = {};
|
||||
|
||||
/**
|
||||
@@ -46,6 +51,7 @@ angular.module('rest').factory('protocolService', ['$http', 'authenticationServi
|
||||
|
||||
// Retrieve available protocols
|
||||
return $http({
|
||||
cache : cacheService.protocols,
|
||||
method : 'GET',
|
||||
url : 'api/protocols',
|
||||
params : httpParameters
|
||||
|
||||
Reference in new issue
Block a user