craymend/rentals-united-caching 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

craymend/rentals-united-caching

Composer 安装命令:

composer require craymend/rentals-united-caching

包简介

Rentals United (rentalsunited.com) data synchronization system for Laravel

README 文档

README

Software License

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 craymend/rentals-united-caching 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-06