Caches the cp option value in the entity cache if it is enabled.

@param cpOptionValue the cp option value
966843
@Override
	public void cacheResult(CPOptionValue cpOptionValue) {
		entityCache.putResult(CPOptionValueModelImpl.ENTITY_CACHE_ENABLED,
			CPOptionValueImpl.class, cpOptionValue.getPrimaryKey(),
			cpOptionValue);

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

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_K,
			new Object[] { cpOptionValue.getCPOptionId(), cpOptionValue.getKey() },
			cpOptionValue);

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

		cpOptionValue.resetOriginalValues();
	}
901457
@Override
	public void setValueMap(Map<java.util.Locale, String> valueMap) {
		_cpDefinitionSpecificationOptionValue.setValueMap(valueMap);
	}
536417
public function setOption($name, $value)
    {
        if ($name == 'cached_entity') {
            $this->setCachedEntity($value);
        } else {
            parent::setOption($name, $value);
        }
    }
79548
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPOptionValue addCPOptionValue(CPOptionValue cpOptionValue) {
		cpOptionValue.setNew(true);

		return cpOptionValuePersistence.update(cpOptionValue);
	}
43029
public void setCPOptionCategoryService(
		com.liferay.commerce.product.service.CPOptionCategoryService cpOptionCategoryService) {
		this.cpOptionCategoryService = cpOptionCategoryService;
	}
561568
@Override
	public void cacheResult(List<CPSpecificationOption> cpSpecificationOptions) {
		for (CPSpecificationOption cpSpecificationOption : cpSpecificationOptions) {
			if (entityCache.getResult(
						CPSpecificationOptionModelImpl.ENTITY_CACHE_ENABLED,
						CPSpecificationOptionImpl.class,
						cpSpecificationOption.getPrimaryKey()) == null) {
				cacheResult(cpSpecificationOption);
			}
			else {
				cpSpecificationOption.resetOriginalValues();
			}
		}
	}
1162386
@Override
	public synchronized void optionsUpdated(IOptions options, long sequence) {
		String previousCacheBust = cacheBust;
		cacheBust = options.getCacheBust();
		if (sequence > 1 && cacheBust != null && !cacheBust.equals(previousCacheBust) && rawConfig != null) {
			// Cache bust property has been updated subsequent to server startup
			processDeps(false, false, sequence);
		}
	}
268840
public void setCPDefinitionOptionValueRelLocalService(
		com.liferay.commerce.product.service.CPDefinitionOptionValueRelLocalService cpDefinitionOptionValueRelLocalService) {
		this.cpDefinitionOptionValueRelLocalService = cpDefinitionOptionValueRelLocalService;
	}
369782
@Override
	public CPOption create(long CPOptionId) {
		CPOption cpOption = new CPOptionImpl();

		cpOption.setNew(true);
		cpOption.setPrimaryKey(CPOptionId);

		String uuid = PortalUUIDUtil.generate();

		cpOption.setUuid(uuid);

		cpOption.setCompanyId(companyProvider.getCompanyId());

		return cpOption;
	}
68773
@Override
	public List<CPOptionValue> findByCPOptionId(long CPOptionId) {
		return findByCPOptionId(CPOptionId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
973689
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPSpecificationOption updateCPSpecificationOption(
		CPSpecificationOption cpSpecificationOption) {
		return cpSpecificationOptionPersistence.update(cpSpecificationOption);
	}
241080
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPOptionValue updateCPOptionValue(CPOptionValue cpOptionValue) {
		return cpOptionValuePersistence.update(cpOptionValue);
	}
786909
public static com.liferay.commerce.product.model.CPOptionValue addCPOptionValue(
		long cpOptionId, java.util.Map<java.util.Locale, String> titleMap,
		double priority, String key,
		com.liferay.portal.kernel.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService()
				   .addCPOptionValue(cpOptionId, titleMap, priority, key,
			serviceContext);
	}
672888
@Override
	public void clearCache() {
		entityCache.clearCache(CPSpecificationOptionImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
721879
@Override
	public void clearCache() {
		entityCache.clearCache(CPDefinitionSpecificationOptionValueImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
330811
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPOption updateCPOption(CPOption cpOption) {
		return cpOptionPersistence.update(cpOption);
	}
1169942
private function storeOptionsInCache() 
    {
        $endpoints = $this->_values[self::OPTION_ENDPOINT];
        $numberOfEndpoints = count($endpoints);

        if ($numberOfEndpoints <= 1) {
            return;
        }

        // now try to store the updated values in the cache
        $cache = $this->getEndpointsCache();
        if ($cache === null) {
            return;
        }
        
        $update = [ $endpoints[$this->_currentEndpointIndex] ];
        for ($i = 0; $i < $numberOfEndpoints; ++$i) {
            if ($i !== $this->_currentEndpointIndex) {
                $update[] = $endpoints[$i];
            }
        }

        $ttl = (int) $this->_values[self::OPTION_MEMCACHED_TTL];
        $cache->set($this->_values[self::OPTION_MEMCACHED_ENDPOINTS_KEY], $update, $ttl);
      }