2

How much data can I push into one craft()->cache key?

Let's say I have a json string that's reaaaallly long.

naboovalley
  • 2,844
  • 1
  • 16
  • 26

1 Answers1

2

craft()->cache can point to different places, depending on what the cacheMethod config setting is set to.

By default, it's set to file, which means that your cache will be saved to the file system in the craft/runtime/storage/cache folder.

So you can pretty much save as much there as you have disk space available.

Just keep in mind, if you're saving something that's 500MB worth of text, PHP is roughly going need 500MB worth of extra memory to be able to read and write that data.

Brad Bell
  • 67,440
  • 6
  • 73
  • 143