public function _setupCacheCalls()
	{
		if ($this->isSettingSet(self::SET_CACHE_CALLS_LENGTH) == false)
		{
			//  Value is not set, setting default values
			$this->setSetting(self::SET_CACHE_CALLS_LENGTH, [
				self::RESOURCE_CHAMPION         => 60 * 10,
				self::RESOURCE_CHAMPIONMASTERY  => 60 * 60,
				self::RESOURCE_LEAGUE           => 60 * 10,
				self::RESOURCE_MATCH            => 0,
				self::RESOURCE_SPECTATOR        => 0,
				self::RESOURCE_STATICDATA       => 60 * 60 * 24,
				self::RESOURCE_STATUS           => 60,
				self::RESOURCE_SUMMONER         => 60 * 60,
				self::RESOURCE_THIRD_PARTY_CODE => 0,
				self::RESOURCE_TOURNAMENT       => 0,
				self::RESOURCE_TOURNAMENT_STUB  => 0,
			]);
		}
		else
		{
			$lengths = $this->getSetting(self::SET_CACHE_CALLS_LENGTH);

			//  Resource caching lengths are specified
			if (is_array($lengths))
			{
				array_walk($lengths, function ($value, $key) {
					if ((!is_integer($value) && !is_null($value)) || strpos($key, ':') == false)
						throw new SettingsException("Value of settings parameter '" . self::SET_CACHE_CALLS_LENGTH . "' is not valid.");
				});
			}
			elseif (!is_integer($lengths))
				throw new SettingsException("Value of settings parameter '" . self::SET_CACHE_CALLS_LENGTH . "' is not valid.");

			if (is_array($lengths))
			{
				//  The value is array, let's check it
				$new_value = [];
				$resources = $this->resources;
				foreach ($resources as $resource)
				{
					if (isset($lengths[$resource]))
					{
						if ($lengths[$resource] > $this->ccc_savetime)
							$this->ccc_savetime = $lengths[$resource];

						$new_value[$resource] = $lengths[$resource];
					}
					else
						$new_value[$resource] = null;
				}

				$this->setSetting(self::SET_CACHE_CALLS_LENGTH, $new_value);
			}
			else
			{
				//  The value is numeric, lets set the same limit to all resources
				$new_value = [];
				$resources = $this->resources;
				$this->ccc_savetime = $lengths;

				foreach ($resources as $resource)
					$new_value[$resource] = $lengths;

				$this->setSetting(self::SET_CACHE_CALLS_LENGTH, $new_value);
			}
		}
	}