mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
cache requests
This commit is contained in:
parent
6b2064ad89
commit
bb0734f8f3
1 changed files with 6 additions and 3 deletions
|
@ -147,15 +147,18 @@ class User < Vulcano.resource(1)
|
|||
private
|
||||
|
||||
def identiy
|
||||
@user_provider.identity(@user) if !@user_provider.nil?
|
||||
return @id_cache if !@id_cache.nil?
|
||||
@id_cache = @user_provider.identity(@user) if !@user_provider.nil?
|
||||
end
|
||||
|
||||
def meta_info
|
||||
@user_provider.meta_info(@user) if !@user_provider.nil?
|
||||
return @meta_cache if !@meta_cache.nil?
|
||||
@meta_cache = @user_provider.meta_info(@user) if !@user_provider.nil?
|
||||
end
|
||||
|
||||
def credentials
|
||||
@user_provider.credentials(@user) if !@user_provider.nil?
|
||||
return @cred_cache if !@cred_cache.nil?
|
||||
@cred_cache = @user_provider.credentials(@user) if !@user_provider.nil?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue