Search code examples
mysqljsoncachingmariadbmaxscale

MaxScale JSON cache rules


I would like to know how to correctly format JSON cache rules to MaxScale. I need to store multiple tables for multiple databases and multiple users, how to correctly format this?

Here, i can store one table on one database and use it for one user.

{
    "store": [
        {
            "attribute": "table",
            "op": "=",
            "value": "databse_alpha.xhtml_content"
        }
    ],
    "use": [
        {
            "attribute": "user",
            "op": "=",
            "value": "'user_databse_1'@'%'"
        }
    ]

}

I need to create rule to store multiple databases for multiple users like table1 and table2 being accessed by user1, table3 and table4 being accessed by user2...and son on.

Thanks.


Solution

  • In Maxscale 2.1 it is only possible to give a single pair of store/use values for the cache filter rules.

    I took the liberty of opening a feature request for MaxScale on the MariaDB Jira as it appears this functionality was not yet requested.