PHP Classes
elePHPant
Icontem

PHP Cache Server: Store and retrieve cached data in a network server

Recommend this page to a friend!
  Info   View files Documentation   View files View files (33)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-07-19 (2 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: 43 This week: 15All time: 9,250 This week: 23Up
Version License PHP version Categories
phpcache 0.5GNU General Publi...5Networking, PHP 5, Databases, Cache, P...
Description Author

This package can store and retrieve cached data in a network server.

It can work as a client and a server that takes TCP connection requests and can store and retrieve data a in a cache container.

The client may request to store, retrieve and delete data in a cache container on the server by sending a request over a TCP connection.

The server handles the TCP request by executing the requested cache operation using arrays as storage container.

  Performance   Level  
Name: Krisztián Dudás <contact>
Classes: 1 package by
Country: Hungary Hungary
Age: 26
All time rank: 420841 in Hungary Hungary
Week rank: 24 Up1 in Hungary Hungary Up

Details

php-cache

Cache implementation for php

Usage:

Prequests:

  • PHP 5/7
  • composer #### Installing via composer: ` composer require kdudas/php-cache ` ##### NOTE: If you do not install via composer, you have to run: ` composer install ` in the root folder of the project #### Supperted data types:
  • String
  • Integer/Float/Double
  • Array (serialized)
  • Objects (serialized) #### Server side initiation: ` <?php include_once 'vendor/autoload.php';

use PhpCache\CacheServer\CacheServer; use PhpCache\ServiceManager\ServiceManager;

$config = require_once 'config.php'; $serviceManager = new ServiceManager($config); $server = $serviceManager->get(CacheServer::class); $server->run();

#### Running the server:

php testServer.php

#### OR
Read the guide in `daemon.sh` on how to run a php script as a service
#### Client side initiation:

<?php include_once('vendor/autoload.php');

use PhpCache\CacheClient\CacheClient; use PhpCache\ServiceManager\ServiceManager;

$config = require_once 'config.php'; $serviceManager = new ServiceManager($config); /@var $client CacheClient/ $client = $serviceManager->get(CacheClient::class); $client->set('test', 'ASD'); echo $client->get('test');

##### You can run the client either from browser or console

php testClient.php

  Files folder image Files  
File Role Description
Files folder image.phan (1 file)
Files folder imagesrc (6 directories)
Plain text file composer.json Data Auxiliary data
Plain text file composer.lock Data Auxiliary data
Plain text file config.php Conf. Configuration script
Plain text file daemon.sh Data Auxiliary data
Plain text file LICENSE Lic. License text
Plain text file parallel_commands.sh Data Script to create parallel connections to server socket (for stress testing purposes)
Plain text file phpCache.php Appl. Example script
Plain text file README.md Doc. Documentation
Plain text file testClient.php Example Class source
Plain text file testServer.php Example Class source

  Files folder image Files  /  .phan  
File Role Description
  Plain text file config.php Aux. Auxiliary script

  Files folder image Files  /  src  
File Role Description
Files folder imageCacheClient (3 files)
Files folder imageCacheServer (4 files)
Files folder imageCommands (3 files)
Files folder imageIO (2 files, 1 directory)
Files folder imageServiceManager (1 file, 1 directory)
Files folder imageStorage (5 files, 1 directory)

  Files folder image Files  /  src  /  CacheClient  
File Role Description
  Plain text file CacheClient.php Class Class source
  Plain text file CacheClientFactory.php Class Class source
  Plain text file ClientInterface.php Class Class source

  Files folder image Files  /  src  /  CacheServer  
File Role Description
  Plain text file ActionHandler.php Class Class source
  Plain text file CacheServer.php Class Class source
  Plain text file CacheServerFactory.php Class Class source
  Plain text file CacheServerInterface.php Class Class source

  Files folder image Files  /  src  /  Commands  
File Role Description
  Plain text file DeleteCommand.php Class Added console comma
  Plain text file GetCommand.php Class Added console comma
  Plain text file SetCommand.php Class Added console comma

  Files folder image Files  /  src  /  IO  
File Role Description
Files folder imageException (2 files)
  Plain text file CacheIOHandler.php Class Class source
  Plain text file CacheIOHandlerFactory.php Class Class source

  Files folder image Files  /  src  /  IO  /  Exception  
File Role Description
  Plain text file InvalidConfigException.php Class Class source
  Plain text file IOException.php Class Class source

  Files folder image Files  /  src  /  ServiceManager  
File Role Description
Files folder imageException (1 file)
  Plain text file ServiceManager.php Class Dependency injection logic

  Files folder image Files  /  src  /  ServiceManager  /  Exception  
File Role Description
  Plain text file NotFoundException.php Class Class source

  Files folder image Files  /  src  /  Storage  
File Role Description
Files folder imageException (1 file)
  Plain text file Bucket.php Class Class source
  Plain text file BucketFactory.php Class Class source
  Plain text file Maintainer.php Class Class source
  Plain text file MaintainerFactory.php Class Class source
  Plain text file StorageInterface.php Class Class source

  Files folder image Files  /  src  /  Storage  /  Exception  
File Role Description
  Plain text file StorageException.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:43
This week:15
All time:9,250
This week:23Up