rockschtar / wordpress-object-storage
Transients in green
Installs: 3 292
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:wordpress-muplugin
Requires
- php: >=7.1
Requires (Dev)
- brain/monkey: ^2.2
- phpunit/phpunit: 7.5.*
This package is auto-updated.
Last update: 2024-12-13 00:09:41 UTC
README
Description
WordPress Must Use Plugin that provides functions simliar to transients but without the general behavior of transients in WordPress. Stored data persist forever or until expiration time. You do not need to serialize values. If the value needs to be serialized, then it will be serialized before it is set. Developed for usage with composer based WordPress projects (roots/bedrock orjohnpbloch/wordpress).
Requirements
- PHP 7.1
- Composer to install
Install
composer require rockschtar/wordpress-object-storage
Usage
Set Object
//without expiration time rsos_set_object('my-key', 'my-value'); //with expiration time rsos_set_object('my-key', 'my-value', 60 * 60 * 24);
Get Object
$myKey = rsos_get_object('my-key');
Delete Object
$myKey = rsos_delete_object('my-key');
License
rockschtar/wordpress-object-storage is open source and released under MIT license. See LICENSE.md file for more info.