Yes, I agree with you. I have seen this solution in the "resources" type 
that generate resources to purge them. 
So, you tell : in the generate method of "group" type, it call instance 
method of the user provider to generate user. With this solution, if I 
define a user in the node, the rest endpoint will be apply twice : the 
first time with prefetch "user" provider and second time by the generate 
method of "group" type. I would like to limit calls to REST API. 

I think I must cache answer of the first call to rest endpoint user in the 
"user" provider. So, the "group" provider can get relationship without 
calling again the REST API. If there is no defined user, "user" provider 
doesn't have prefetched data but it will cache them at first call. 

Do you think it is the better implementation ?
Do you know if there is other module with this implementation ?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/bcea1b07-b486-4c93-8b79-008a8ce0d00b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to