koinephp/DelayedCache

View on GitHub
src/DelayedCacheInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Koine\DelayedCache;

use Closure;

/**
 * Koine\DelayedCache\DelayedCacheInterface
 */
interface DelayedCacheInterface
{
    /**
     * @param string  $key
     * @param Closure $closure
     *
     * @return self
     */
    public function setDelayedItem($key, Closure $closure);

    /**
     * @param string  $key
     * @param Closure $closure
     *
     * @return mixed
     */
    public function getCachedItem($key, Closure $closure);

    /**
     * @param string $key
     *
     * @return bool
     */
    public function itemIsUnderConstruction($key);
}