StateInterface.php 763 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\App\Cache;
  7. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. interface StateInterface
  12. {
  13. /**
  14. * Whether a cache type is enabled at the moment or not
  15. *
  16. * @param string $cacheType
  17. * @return bool
  18. */
  19. public function isEnabled($cacheType);
  20. /**
  21. * Enable/disable a cache type in run-time
  22. *
  23. * @param string $cacheType
  24. * @param bool $isEnabled
  25. * @return void
  26. */
  27. public function setEnabled($cacheType, $isEnabled);
  28. /**
  29. * Save the current statuses (enabled/disabled) of cache types to the persistent storage
  30. *
  31. * @return void
  32. */
  33. public function persist();
  34. }