mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUAC-1126 Add caching of GET requests in REST API services.
This commit is contained in:
@@ -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