/** * Build the key representing this missed cache item. Will include sandbox information if * appropriate. * * @param params the appropriate params comprising a unique key for this cache item * @return the completed key */ protected String buildKey(String... params) { BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext(); SandBox sandBox = context.getSandBox(); String key = StringUtils.join(params, '_'); if (sandBox != null) { key = sandBox.getId() + "_" + key; } return key; }
public Long getSandBoxId() { if (sandBox != null) { return sandBox.getId(); } return null; }