in Education by
In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you can just throw your data-logic objects into them, and hey-presto, you only need query the database once for a bit of data. By far one of the best ASPNET features, IMO. I've since ditched Windows for Linux, and therefore PHP, Python and Ruby for webdev. I use PHP most because I dev several open source projects, all using PHP. Needless to say, I've explored what PHP has to offer in terms of caching data-objects. So far I've played with: Serializing to file (a pretty slow/expensive process) Writing the data to file as JSON/XML/plaintext/etc (even slower for read ops) Writing the data to file as pure PHP (the fastest read, but quite a convoluted write op) I should stress now that I'm looking for a solution that doesn't rely on a third party app (eg memcached) as the apps are installed in all sorts of scenarios, most of which don't have install rights (eg: a cheap shared hosting account). So back to what I'm doing now, is persisting to file secure? Rule 1 in production server security has always been disable file-writing, but I really don't see any way PHP could cache if it couldn't write. Are there any tips and/or tricks to boost the security? Is there another persist-to-file method that I'm forgetting? Are there any better methods of caching in "limited" environments? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Serializing is quite safe and commonly used. There is an alternative however, and that is to cache to memory. Check out memcached and APC, they're both free and highly performant. This article on different caching techniques in PHP might also be of interest.

Related questions

0 votes
    In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    I am struggling to figure out how to specify a MOTO payment with Stripe API and PHP. I believe I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I'm trying to produce a page that would function a bit like a digital sticker album. My SQL ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 28, 2022 in Education by JackTerrance
0 votes
    I am aware that I can use array_unique(array_merge($a,$b)); to merge two arrays and then remove ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    I want to load Google fonts in the head-section of my page using a php-function. My -area looks like this: ... ... Now ... I do this, there will be a "1" displayed (because of the...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I want to load Google fonts in the head-section of my page using a php-function. My -area looks like this: ... ... Now ... I do this, there will be a "1" displayed (because of the...
asked May 30, 2022 in Education by JackTerrance
0 votes
    I want to load Google fonts in the head-section of my page using a php-function. My -area looks like this: ... ... Now ... I do this, there will be a "1" displayed (because of the...
asked May 26, 2022 in Education by JackTerrance
0 votes
    Is it possible to cache database connections when using PHP like you would in a J2EE container? If so, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I want to load Google fonts in the head-section of my page using a php-function. My -area looks like this: ... ... Now ... I do this, there will be a "1" displayed (because of the...
asked May 17, 2022 in Education by JackTerrance
0 votes
    How can I get the value of the amp selector and save it in a php variable 1 1 1 I tried ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    I have a script which loops over tables and fields doing a find and replace. The script takes around ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    So this is a zany thing that I'm attempting to do, but what I am trying to achieve is querying ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    So this is a zany thing that I'm attempting to do, but what I am trying to achieve is querying ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
...