def all(options = {})
if service.openstack_cache_ttl > 0
cached_project, expires = Fog::Identity::OpenStack::V3::Project.cache[{:token => service.auth_token,
:options => options}]
return cached_project if cached_project && expires > Time.now
end
project_to_cache = load_response(service.list_projects(options), 'projects')
if service.openstack_cache_ttl > 0
cache = Fog::Identity::OpenStack::V3::Project.cache
cache[{:token => service.auth_token, :options => options}] = [project_to_cache,
Time.now + service.openstack_cache_ttl]
Fog::Identity::OpenStack::V3::Project.cache = cache
end
project_to_cache
end