Simple-cache - PHP FIG Simple Cache PSR

Overview

PHP FIG Simple Cache PSR

This repository holds all interfaces related to PSR-16.

Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See the specification for more details.

You can find implementations of the specification by looking for packages providing the psr/simple-cache-implementation virtual package.

Comments
  • CacheException / Throwable

    CacheException / Throwable

    Extends CacheException with \Throwable interface. With PHP 5 backward compatibility.

    A do an error on pull request : https://github.com/php-fig/simple-cache/pull/12 ; sorry ;)

    opened by ElGigi 27
  • Fix type-hint for `DateInterval` in PHPDoc

    Fix type-hint for `DateInterval` in PHPDoc

    This PR fixes type-hint for DateInterval, which should be marked as class from global namespace with leading backslash (\) otherwise IDE assumes it refers to Psr\SimpleCache\DateInterval, which does not exist.

    In addition basic class PHPDoc for CacheInterface provided to be consistent with interface definitions from other PSRs.

    opened by klimov-paul 5
  • Add a NullCache

    Add a NullCache

    Just like the logging library I suggest to add a NullCache implementation in order to avoid conditional cache calls.

    https://github.com/php-fig/log/blob/master/Psr/Log/NullLogger.php

    opened by Ekman 3
  • Update reflecting suggestions since opening final review

    Update reflecting suggestions since opening final review

    • Remove CounterInterface from this spec
    • Add CacheException & InvalidArgumentException interfaces
    • Return success status (bool) on delete, clear & deleteMultiple
    • Introduce a default value for getMultiple
    • Various documentation clarifications
    opened by matthiasmullie 2
  • Add PHP parameter types

    Add PHP parameter types

    Included in this PR are two commits, proposing:

    v1.1 for PHP 7.2+ with parameter types (PHP 7.2 the first version with parameter type widening to prevent bc breaks) v1.2 for PHP 8 with union parameter types and mixed type

    opened by navarr 0
  • [Feature] Split PSR-16 into smaller interfaces for greater re-usability

    [Feature] Split PSR-16 into smaller interfaces for greater re-usability

    I partly expect this to maybe be closed as this change makes it harder to determine if some code actually implements PSR-16, but:

    Background for this was I found myself in position where I only needed single cache methods (get, set, delete) and clear() for a internal in-memory class and was thinking there might be value in having a PSR interface to implement for it, if someone would find themselves in position where they'd like a different behaviour.

    I also see possible value in having a separate interface for clear(), as it is something we need for any classes holding some sort of objects in memory (for cases we deem safe) to avoid re-loading the given object repeatedly.

    opened by andrerom 0
  • extend cache interface with throwable for v1.x.x

    extend cache interface with throwable for v1.x.x

    Hello, can you please release this fix as 1.0.2?

    This is a fix for PHP 7.4

    Static analysators (PHPStan) returns error for @throws doc that Psr\SimpleCache\InvalidArgumentException is not subtype of Throwable

    This issue is already fixed in v2 and v3, but they are also using union types, which breaks PHP 7.4

    (unfortunately updating project to 8.0+ is not under my control)

    opened by Zrnik 0
  • Introduce CHANGELOG.md

    Introduce CHANGELOG.md

    I was looking at the dependency graph of some of my applications and I noticed I was mostly depending on psr/simple-cache:^1.0. I knew about the introduction of version 2.0.0 and 3.0.0 and of the rationale behind having a separate 2.0.0 and 3.0.0 branch. What I had forgotten was exactly what the difference was between those two. Typically a changelog is a central location to see the changes per release. This repository was missing that changelog. I took the liberty of creating one.

    • Introduce CHANGELOG.md, populated with the releases starting with 1.0.0. The format is based on Keep a Changelog and the changelog from psr/cache.
    opened by timoschinkel 0
  • docs: Standardize the README

    docs: Standardize the README

    What: Standardizes the README file providing a common language and an implementation link.

    Why: There are differences between PSR's READMEs in regarding language and the lacking of implementations references. So I've updated all READMEs using the https://github.com/php-fig/http-factory as base.

    opened by gnumoksha 1
  • Corrected type hints

    Corrected type hints

    Per this thread, I understand that tool support is not a concern or priority for the FIG, so I don't expect this PR will be merged - a replacement package with corrected type-hints has been published and can be installed as mindplay/simple-cache now.

    opened by mindplay-dk 5
Releases(3.0.0)
  • 3.0.0(Oct 29, 2021)

  • 2.0.0(Oct 29, 2021)

    • Adds parameter types
    • Makes CacheException extend \Throwable
    • Requires PHP 8

    See the meta doc, section Errata for more details: https://www.php-fig.org/psr/psr-16/meta/

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Dec 9, 2016)

    • Remove CounterInterface from this spec
    • Add CacheException & InvalidArgumentException interfaces
    • Return success status (bool) on delete, clear & deleteMultiple
    • Introduce a default value for getMultiple
    • Various documentation clarifications
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Nov 16, 2016)

    • Added a $default param to get() to return something else than null when the key is missing
    • Removed TTL_DAY, TTL_HOUR and TTL_MINUTE constants
    • Renamed exists() to has() for consistency with PSR-6
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Nov 16, 2016)

Owner
PHP-FIG
PHP-FIG
A simple wrapper for PHP Intervention Library to provide a more simple interface and convenient way to convert images to webp

This package is a simple wrapper for PHP Intervention Library to provide a more simple interface and convenient way to convert images to webp - next generation format - extension, and resize them to render only needed sizes.

eyad hamza 18 Jun 28, 2022
Simple-podcast-generator - 👉 A very simple way to host your podcast files and generate the RSS Podcast feed 🎙

Podcast RSS Feed Generator A very simple way to host your podcast files and generate the RSS Podcast feed ?? ?? Contents Summary Requirements Installa

♚ PH⑦ de Soria™♛ 11 Dec 2, 2022
A simple PHP library for complex monetary prices management

PHP Prices ?? Version 2.x This new major version is shifting the package towards more flexibility and configuration possibilities in general. One of t

Whitecube 134 Dec 16, 2022
Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets)

clue/socket-raw Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets). PHP offers two networking APIs, the newer stre

Christian Lück 321 Dec 15, 2022
Project of Simple Blog using: HTML, CSS, PHP, MYSQL, and BOOTSTRAP

Project-Stormwind Project of Simple Blog using: HTML, CSS, PHP, MYSQL, and BOOTSTRAP Functions : A personal blog about Blizzard and their work Main Th

Jan Andrzejewski 2 Aug 24, 2022
Simple and Lightweight PHP Class & Methods Annotations Reader

README Simple and Lightweight PHP Class & Methods Annotations Reader Forked from eriknyk/Annotations 项目地址 github https://github.com/phppkg/annotations

PHPPkg 3 Nov 25, 2021
A simple and useful blog coded with laravel & php.

Blog with Setup Directions npm install composer install Set database infos in the .env php artisan migrate:fresh --seed php artisan serve npm run hot

Mustafa Tofur 1 Oct 11, 2022
PHP SİMPLE HTML DOM with news website

PHP SİMPLE HTML DOM with news website I found a library that can pull data from a site to my own site with php. I used it and pulled the yield from a

Uğur Mercan 2 Oct 26, 2022
A simple web application for seeing a store's books. Built with Laravel 8 (a PHP Framework).

HappyBookStore Happy Book Store is a simple web application for seeing a store's books. As a user, you can look what book is available in the store by

Ananda Bilal 0 Jan 31, 2022
Bolt is a simple CMS written in PHP. It is based on Silex and Symfony components, uses Twig and either SQLite, MySQL or PostgreSQL.

⚠️ Note - Not the latest version This is the repository for Bolt 3. Please know that Bolt 5 has been released. If you are starting a new project, plea

Bolt 4.1k Dec 27, 2022
Simple PHP package to get any Facebook Page posts

Get Facebook Page Feed It is simple wrapper class written in php to fetch posts from certain Facebook page. Currently I am using Facebook graph API wi

Mohd Hafiz 61 Dec 14, 2022
Created simple login system and chat type website using mysql database along with php and html , css and javascript.

Created simple login system and chat type website using mysql database along with php and html , css and javascript.

null 1 Jan 6, 2022
A simple blog project based on a custom-created MVC framework using PHP & MySQL

A simple blog project based on a custom-created MVC framework using PHP & MySQL. That follows the Facade design pattern.

Samiul Arafah Dhrubo 2 May 28, 2022
MINI is an extremely simple and easy to understand skeleton PHP application

MINI MINI is an extremely simple and easy to understand skeleton PHP application, reduced to the max. MINI is NOT a professional framework and it does

Chris 1.3k Dec 22, 2022
A simple PHP web system for managing an Supermarket.

#Supermarket Management System A simple PHP web system for managing an Supermarket. Installation Clone the repository and move the root folder to the

Navin Gohite 2 Feb 9, 2022
A simple todo app, built with bootstrap, php native, mysql

A simple todo app, built with bootstrap, php native, mysql

Muhammad Fatkurozi 1 Apr 3, 2022
A simple web application that demonstrates how to quickly connect to and communicate with a MariaDB database using PHP

PHP Quickstart This repository contains a simple web application that demonstrates how to quickly connect to and communicate with a MariaDB database u

Developer Code Central 8 Nov 6, 2022
Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7

Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7. A looking glass is a network utility which is made user-friendly for everyone to use. It allows you to execute network related commands within a remote network, usually that of an ISP.

Hybula 77 Jan 1, 2023
A Simple Facebook Video Downloader using PHP.

Facebook Video Downloader A simple Facebook Video Downloader using PHP. Feature Download Public Video Download Private Video All Quality How to use Co

Tran Viet Hoang 2 Sep 5, 2022