Drivers

The PHPFast framework features a powerful and adaptable driver system that streamlines key functionalities such as database management, caching, and more. Designed for flexibility, these drivers abstract complex implementation details, enabling developers to seamlessly switch between different technologies or services without modifying the core application logic

  • Provide caching mechanisms to improve application performance.

  • Supported Cache Systems: Redis, File-based caching, ...

<?php
$cache = new RedisCache($config);
$cache->set('key', 'value', 600); // Cache for 10 minutes
$value = $cache->get('key');
  • Store and retrieve cached data.

  • Manage cache expiration and invalidation.

  • Support for various caching strategies (e.g., in-memory, distributed).

  • Facilitate interactions with different database management systems (DBMS).

  • Supported Databases: MySQL, PostgreSQL, SQLite, and more.

?php
$configdb = config('db');
$dbConnection = loadDatabaseDriver($configdb['db_driver'], $configdb);
  • Establish connections to the database.

  • Execute queries and retrieve results.

  • Handle transactions and ensure data integrity.

Last updated

Was this helpful?