Per {@link #applicationTenancyPathFor(Object)}, with result cached for the remainder of the request using the {@link QueryResultsCache}.
439612
protected String applicationTenancyPathForCached(final Object domainObject) {
        return queryResultsCache.execute(new Callable<String>() {
            @Override
            public String call() throws Exception {
                return applicationTenancyPathFor(domainObject);
            }
        }, TenantedAuthorizationFacetDefault.class, "applicationTenancyPathFor", domainObject);
    }
691485
@Override
	public void cacheResult(CPInstance cpInstance) {
		entityCache.putResult(CPInstanceModelImpl.ENTITY_CACHE_ENABLED,
			CPInstanceImpl.class, cpInstance.getPrimaryKey(), cpInstance);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] { cpInstance.getUuid(), cpInstance.getGroupId() },
			cpInstance);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_C,
			new Object[] {
				cpInstance.getCPDefinitionId(), cpInstance.getCPInstanceUuid()
			}, cpInstance);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_S,
			new Object[] { cpInstance.getCPDefinitionId(), cpInstance.getSku() },
			cpInstance);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_ERC,
			new Object[] {
				cpInstance.getCompanyId(), cpInstance.getExternalReferenceCode()
			}, cpInstance);

		cpInstance.resetOriginalValues();
	}
481508
@Override
  public AppResponse getApp(WebResource resource, ResourcePath<App> appResourcePath) {
    return resource.path(appResourcePath.getPath()).get(AppResponse.class);
  }
1273882
@Override
	public void cacheResult(
		List<CommerceNotificationTemplateUserSegmentRel> commerceNotificationTemplateUserSegmentRels) {
		for (CommerceNotificationTemplateUserSegmentRel commerceNotificationTemplateUserSegmentRel : commerceNotificationTemplateUserSegmentRels) {
			if (entityCache.getResult(
						CommerceNotificationTemplateUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
						CommerceNotificationTemplateUserSegmentRelImpl.class,
						commerceNotificationTemplateUserSegmentRel.getPrimaryKey()) == null) {
				cacheResult(commerceNotificationTemplateUserSegmentRel);
			}
			else {
				commerceNotificationTemplateUserSegmentRel.resetOriginalValues();
			}
		}
	}
1137557
@Override
	public void cacheResult(
		CommerceUserSegmentCriterion commerceUserSegmentCriterion) {
		entityCache.putResult(CommerceUserSegmentCriterionModelImpl.ENTITY_CACHE_ENABLED,
			CommerceUserSegmentCriterionImpl.class,
			commerceUserSegmentCriterion.getPrimaryKey(),
			commerceUserSegmentCriterion);

		commerceUserSegmentCriterion.resetOriginalValues();
	}
913109
@Override
    public long getLastModified(HttpServletRequest request) {
        String path;
        int idx;
        long result;

        result = -1;
        try {
            path = request.getPathInfo();
            if (path != null && path.startsWith("/get/")) {
                lazyInit(request);
                path = path.substring(5);
                idx = path.indexOf('/');
                if (idx != -1) {
                    path = path.substring(idx + 1);
                    result = engine.getLastModified(path);
                }
            }
        } catch (IOException e) {
            error(request, "getLastModified", e);
            // fall-through
        } catch (RuntimeException | Error e) {
            error(request, "getLastModified", e);
            throw e;
        }
        LOG.debug("getLastModified(" + request.getPathInfo() + ") -> " + result);
        return result;
    }
83287
public JsonGetterContext getContext(String queryPath) {
        JsonGetterContext context = internalCache.get(queryPath);
        if (context != null) {
            return context;
        }
        context = new JsonGetterContext(queryPath);
        JsonGetterContext previousContextValue = internalCache.putIfAbsent(queryPath, context);
        if (previousContextValue == null) {
            cleanupIfNeccessary(context);
            return context;
        } else {
            return previousContextValue;
        }
    }
840255
@Override
	public void cacheResult(
		CommerceTaxFixedRateAddressRel commerceTaxFixedRateAddressRel) {
		entityCache.putResult(CommerceTaxFixedRateAddressRelModelImpl.ENTITY_CACHE_ENABLED,
			CommerceTaxFixedRateAddressRelImpl.class,
			commerceTaxFixedRateAddressRel.getPrimaryKey(),
			commerceTaxFixedRateAddressRel);

		commerceTaxFixedRateAddressRel.resetOriginalValues();
	}
290785
@Programmatic
    public List<ApplicationTenancy> allTenancies() {
        return queryResultsCache.execute(new Callable<List<ApplicationTenancy>>() {
            @Override
            public List<ApplicationTenancy> call() throws Exception {
                return allTenanciesNoCache();
            }
        }, ApplicationTenancyRepository.class, "allTenancies");
    }
179849
@Override
	public void cacheResult(List<CommerceAddress> commerceAddresses) {
		for (CommerceAddress commerceAddress : commerceAddresses) {
			if (entityCache.getResult(
						CommerceAddressModelImpl.ENTITY_CACHE_ENABLED,
						CommerceAddressImpl.class,
						commerceAddress.getPrimaryKey()) == null) {
				cacheResult(commerceAddress);
			}
			else {
				commerceAddress.resetOriginalValues();
			}
		}
	}
569602
@Override
	public void cacheResult(CPDisplayLayout cpDisplayLayout) {
		entityCache.putResult(CPDisplayLayoutModelImpl.ENTITY_CACHE_ENABLED,
			CPDisplayLayoutImpl.class, cpDisplayLayout.getPrimaryKey(),
			cpDisplayLayout);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] { cpDisplayLayout.getUuid(), cpDisplayLayout.getGroupId() },
			cpDisplayLayout);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_C,
			new Object[] {
				cpDisplayLayout.getClassNameId(), cpDisplayLayout.getClassPK()
			}, cpDisplayLayout);

		cpDisplayLayout.resetOriginalValues();
	}
1181799
@Override
	public void cacheResult(CPDAvailabilityEstimate cpdAvailabilityEstimate) {
		entityCache.putResult(CPDAvailabilityEstimateModelImpl.ENTITY_CACHE_ENABLED,
			CPDAvailabilityEstimateImpl.class,
			cpdAvailabilityEstimate.getPrimaryKey(), cpdAvailabilityEstimate);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] {
				cpdAvailabilityEstimate.getUuid(),
				cpdAvailabilityEstimate.getGroupId()
			}, cpdAvailabilityEstimate);

		finderCache.putResult(FINDER_PATH_FETCH_BY_CPRODUCTID,
			new Object[] { cpdAvailabilityEstimate.getCProductId() },
			cpdAvailabilityEstimate);

		cpdAvailabilityEstimate.resetOriginalValues();
	}
1105042
@Override
	public void cacheResult(
		List<CommerceSubscriptionEntry> commerceSubscriptionEntries) {
		for (CommerceSubscriptionEntry commerceSubscriptionEntry : commerceSubscriptionEntries) {
			if (entityCache.getResult(
						CommerceSubscriptionEntryModelImpl.ENTITY_CACHE_ENABLED,
						CommerceSubscriptionEntryImpl.class,
						commerceSubscriptionEntry.getPrimaryKey()) == null) {
				cacheResult(commerceSubscriptionEntry);
			}
			else {
				commerceSubscriptionEntry.resetOriginalValues();
			}
		}
	}
392516
protected String userTenancyPathForCached(final ApplicationUser applicationUser) {
        return queryResultsCache.execute(new Callable<String>() {
            @Override
            public String call() throws Exception {
                return userTenancyPathFor(applicationUser);
            }
        }, TenantedAuthorizationFacetDefault.class, "userTenancyPathFor", applicationUser);
    }
285785
@Override
	public void cacheResult(
		List<CommerceNotificationQueueEntry> commerceNotificationQueueEntries) {
		for (CommerceNotificationQueueEntry commerceNotificationQueueEntry : commerceNotificationQueueEntries) {
			if (entityCache.getResult(
						CommerceNotificationQueueEntryModelImpl.ENTITY_CACHE_ENABLED,
						CommerceNotificationQueueEntryImpl.class,
						commerceNotificationQueueEntry.getPrimaryKey()) == null) {
				cacheResult(commerceNotificationQueueEntry);
			}
			else {
				commerceNotificationQueueEntry.resetOriginalValues();
			}
		}
	}
246646
private static List<String> determinePaths(final MethodResult methodResult) {
        final List<String> paths = new LinkedList<>();
        MethodResult currentMethod = methodResult;

        while (true) {
            addNonBlank(currentMethod.getPath(), paths);
            final ClassResult parentClass = currentMethod.getParentResource();

            if (parentClass == null)
                break;

            currentMethod = parentClass.getParentSubResourceLocator();
            if (currentMethod == null) {
                addNonBlank(parentClass.getResourcePath(), paths);
                break;
            }
        }

        Collections.reverse(paths);
        return paths;
    }
447801
public URI getResultPath() {
        final String str = _customProperties.get(PROPERTY_RESULT_PATH);
        if (Strings.isNullOrEmpty(str)) {
            return null;
        }
        return URI.create(str);
    }