Framework: Isn't MEDIUMTEXT better when caching big data to database?

Created on 15 Nov 2017  路  3Comments  路  Source: laravel/framework

https://github.com/laravel/framework/blob/a7cbe215cac1ae5c05923ee2da64cd6da734c571/src/Illuminate/Cache/Console/stubs/cache.stub#L18

When using php artisan cache:table a cache table with a value field TEXT is created when using MySQL. In some cases the database cache with MySQL can behave different to the file cache.

Some plugins caches big data and they wasn't longer working when switching the default CACHE_DRIVER from file to database inside the .env file.

I changed the migration to work with MEDIUMTEXT instead of TEXT.

Isn't it a good idea? Maybe it's an issue with speed?
And if is OK to do like this, shouldn't this be changed in the default stub?

All 3 comments

This repo is for bug tracking. Use the forums or slack channel for solving your issue

I think that's a reasonable request, why don't you open a PR about it.

PostgreSQL, SQLite and SqlServer don't even have a text and longtext, only MySQL differentiates there and MySQL text is limited to 64 Kb.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PhiloNL picture PhiloNL  路  3Comments

SachinAgarwal1337 picture SachinAgarwal1337  路  3Comments

CupOfTea696 picture CupOfTea696  路  3Comments

JamborJan picture JamborJan  路  3Comments

jackmu95 picture jackmu95  路  3Comments