craymend/rentals-united-caching
Composer 安装命令:
composer require craymend/rentals-united-caching
包简介
Rentals United (rentalsunited.com) data synchronization system for Laravel
README 文档
README
Synchronize Rentals United data with your local database.
Installation
NOTE: If you haven't set up a database yet for your app, please do that first as per Laravel docs - https://laravel.com/docs/5.5/database.
Via composer.
composer require craymend/rentals-united-caching
Run
artisan vendor:publish
followed by
artisan migrate
Now in your .env file, define your Rentals United credentials and path to store the downloaded XML files (temporary storage):
RENTALS_UNITED_USERNAME=<your Rentals United username/email> RENTALS_UNITED_PASSWORD=<your Rentals United password> XML_CACHE_DIR='/path/to/cache/directory/'
Usage Examples
-
artisan rentals_united:cache_all
- Init RU data. Truncate all tables and cache everything.
-
artisan rentals_united:cache_dictionaries
- Truncate all dictionary tables and cache dictionary data.
- RU docs recommend running this "once a month".
-
artisan rentals_united:cache_properties --id=4,5
- Cache specific properties on demand by id.
-
artisan rentals_united:cache_properties --id=new
- Find and cache all properties created in the last 2 hours
-
artisan rentals_united:update_change_log --since="-1 day"
- Update change logs older then 'since' given date/time.
- RU docs recommend running this "at least once a day".
-
artisan rentals_united:update_properties --since="-1 day"
- Update properties data with local change log date 'since' given date/time.
- RU docs recommend running this "at least once a day".
-
artisan rentals_united:cache_reservations --since="-20 minute"
- Cache reservations with LastMod in window 'since' given date/time to current time. Does not truncate any existing reservations.
- RU does not allow a window larger then 7 days.
- RU docs recommend running this "at least every 20 minutes".
-
artisan rentals_united:cache_reservations --id=3,4
- Cache specific reservations on demand by id.
Laravel Scheduler Example
Laravel task scheduling makes it easy to update cached data.
Example:
protected function schedule(Schedule $schedule)
{
$dayStr = date('Y-m-d');
$schedule->command('rentals_united:update_reservations --since="-21 minute"')
->appendOutputTo(storage_path("logs/cron-{$dayStr}.log"))
->cron('*/20 * * * * *');
$schedule->command('rentals_united:cache_dictionaries')
->appendOutputTo(storage_path("logs/cron-{$dayStr}.log"))
->monthlyOn(1, '00:00');
$schedule->command('rentals_united:update_change_log')
->appendOutputTo(storage_path("logs/cron-{$dayStr}.log"))
->dailyAt('00:00');
$schedule->command('rentals_united:update_properties --since="-25 hour"')
->appendOutputTo(storage_path("logs/cron-{$dayStr}.log"))
->dailyAt('00:00');
}
License
The MIT License (MIT). Please see License File for more information.
craymend/rentals-united-caching 适用场景与选型建议
craymend/rentals-united-caching 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 12 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「rentals united」 「rentalsunited.com」 「data caching」 「data sync」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 craymend/rentals-united-caching 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 craymend/rentals-united-caching 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 craymend/rentals-united-caching 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple PHP class for United States Postal Service (USPS) addresses
Square Payments integration with Magento 2
Convert and operate with FIPS codes for states, counties, etc.
Klarna integration with Magento 2
Alfabank REST API integration
Paymill integration with Magento 2
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-06