title: Doubts about saving SVG files and retrieving
body: <p>I made a system that a user uploads an Gerber File (Printed circuit board format), and then i convert with PHP that file (GCode), to SVG.</p>
  
  <p>I'm facing a problem now, that is actualy a arquitecture problem.</p>
  
  <p>Shall i save the SVG in a File, or on the Database?</p>
  
  <p>And should i return the SVG as an JSON like ({name: test, data: SVGFILEGOESHERE}) or just render as a .svg? I mean, is JSON safe enough for a BIG data structure?</p>
  
  <p>EDIT:</p>
  
  <p>The Converted SVG will be used in many views in the website, such as: Products pages, configure pages... It's not going to show only one time...</p>
  
  <p>The main idea, is to send a GCode to the server, and once anyone requires that file, if it's not rendered, then it renders, and saves the SVG on the database, or in a file, and store a cache, to avoid re-processing the same file many times.</p>
  
  <p>The SVG, would be retrieved with ajax, and also <s>rendered</s> inserted on the page (but i think i will load everything with ajax).</p>
  
  <p>The file once sent to server, will never be MODIFIED, but can be deleted, and re-sent...</p>
  
  <p>Thanks</p>