# 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

## [**Cache Drivers**](/documents/drivers/cache.md)

* Provide caching mechanisms to improve application performance.
* **Supported Cache Systems**: Redis, File-based caching, ...

```php
<?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).

## [**Database Drivers**](/documents/drivers/database.md)

* Facilitate interactions with different database management systems (DBMS).
* **Supported Databases**: MySQL, PostgreSQL, SQLite, and more.

```php
?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.

{% hint style="success" %}
Summary

The driver system in the **PHPFast** framework provides a powerful and flexible way to interact with various services and technologies. By abstracting the underlying implementation details, drivers allow developers to easily switch between different systems without changing the core application logic. This modular approach enhances the maintainability and scalability of the application, making it easier to integrate new technologies and optimize performance.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cmsfullform.com/documents/drivers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
