# File lib/fog/identity/openstack/v3/models/domains.rb, line 36
          def find_by_id(id)
            if service.openstack_cache_ttl > 0
              cached_domain, expires = Fog::Identity::OpenStack::V3::Domain.cache[{:token => service.auth_token,
                                                                                   :id    => id}]
              return cached_domain if cached_domain && expires > Time.now
            end
            domain_hash = service.get_domain(id).body['domain']
            domain_to_cache = Fog::Identity::OpenStack::V3::Domain.new(
              domain_hash.merge(:service => service)
            )

            if service.openstack_cache_ttl > 0
              cache = Fog::Identity::OpenStack::V3::Domain.cache
              cache[{:token => service.auth_token, :id => id}] = [domain_to_cache, Time.now + service.openstack_cache_ttl]
              Fog::Identity::OpenStack::V3::Domain.cache = cache
            end
            domain_to_cache
          end