Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthormrcyril
     
    Hi

    I recently applied some changes to my database schema on a production server. These changes did not get reflected in the ActiveRecords until I cleared out the Session files on the filesystem.

    First question is how long do Sessions persist for and then how do I prevent the schema from being cached?

    I haven't made any changes to the production environment file; the following is intact

    // ak_define('ACTIVE_RECORD_VALIDATE_TABLE_NAMES', false);
    // ak_define('ACTIVE_RECORD_SKIP_SETTING_ACTIVE_RECORD_DEFAULTS', true);
    // ak_define('ACTIVE_RECORD_ENABLE_PERSISTENCE', true);
    // ak_define('ACTIVE_RECORD_CACHE_DATABASE_SCHEMA', true);
    // ak_define('ACTIVE_RECORD_CACHE_DATABASE_SCHEMA_LIFE', 86400);

    best wishes

    Cyril
    • CommentAuthorKaste
     

    It's a bit like the answer is in the question, isn't it?

    but seriously the cache is on in production-mode by default. I think I see the problem (can't remember the code exactly right now), could be worth a ticket. I think not so super trivial to solve.

    (search for ACTIVE_RECORD_CACHE_DATABASE_SCHEMA in AkActiveRecord.php; not more than 3-4 methods will use this.)

    • CommentAuthorcyril.mr
     
    Thanks for the response Kaste.

    I have been away for a few days so haven't had chance to dig deeper yet. I'll post anything that I find out or raise a ticket if necessary.

    Cyril